Skip to content

Commit

Permalink
fix: test case that only works with constant folding is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed May 6, 2024
1 parent c09d64f commit e8d158f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
19 changes: 19 additions & 0 deletions lib/src/compiler/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,25 @@ fn errors_2() {
| ^^^ duplicate declaration of `foo`
|"
);

#[cfg(feature = "constant-folding")]
assert_eq!(
Compiler::new()
.add_source(
"rule test {
condition:
9223372036854775807 + 1000000000 == 0
}"
)
.unwrap_err()
.to_string(),
"error: number out of range
--> line:3:4
|
3 | 9223372036854775807 + 1000000000 == 0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this number is out of the allowed range [-9223372036854775808-9223372036854775807]
|"
);
}

#[test]
Expand Down
4 changes: 0 additions & 4 deletions lib/src/compiler/tests/testdata/errors/124.in

This file was deleted.

6 changes: 0 additions & 6 deletions lib/src/compiler/tests/testdata/errors/124.out

This file was deleted.

0 comments on commit e8d158f

Please sign in to comment.