Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Davichet-e committed Oct 17, 2024
1 parent 99e82bb commit 1245d9d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,5 @@ jobs:
- name: Build
run: cargo build --verbose

- name: Run lib tests
# They need to be run in sequence because MEOS doesn't support multi-threading
run: cargo test --verbose --lib -- --test-threads 1

- name: Run doc tests
run: cargo test --verbose --doc
- name: Run tests
run: cargo test --verbose
1 change: 1 addition & 0 deletions src/temporal/number/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pub mod tint;
pub mod tnumber;

#[cfg(test)]
#[serial_test::serial]
mod tests {
use crate::{meos_initialize, meos_initialize_timezone};

Expand Down
6 changes: 5 additions & 1 deletion src/temporal/tbool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,14 +543,16 @@ impl BitOr<bool> for TBool {
impl TBoolTrait for TBool {}

#[cfg(test)]
#[serial_test::serial]
mod tests {
use crate::meos_initialize;
use crate::{meos_initialize, meos_initialize_timezone};

use super::*;

#[test]
fn instant_tbool() {
meos_initialize();
meos_initialize_timezone("UTC");
let string = "t@2018-01-01 08:00:00+00";
let result: TBool = string.parse().unwrap();
assert_eq!(
Expand All @@ -562,6 +564,7 @@ mod tests {
#[test]
fn sequence_tbool() {
meos_initialize();
meos_initialize_timezone("UTC");
let string = "[t@2018-01-01 08:00:00+00]";
let result: TBool = string.parse().unwrap();
assert_eq!(
Expand All @@ -573,6 +576,7 @@ mod tests {
#[test]
fn sequence_set_tbool() {
meos_initialize();
meos_initialize_timezone("UTC");
let string = "{[t@2018-01-01 08:00:00+00]}";
let result: TBool = string.parse().unwrap();
assert_eq!(
Expand Down

0 comments on commit 1245d9d

Please sign in to comment.