Skip to content

Commit

Permalink
Add test case for math.entropy where input is an empty string.
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Mar 25, 2024
1 parent 07e46fa commit 94b7da9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test-math.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ int main(int argc, char** argv)
}",
NULL);

assert_true_rule(
"import \"math\" \
rule test { \
condition: \
math.entropy(\"\") == 0.0 \
}",
NULL);

assert_true_rule(
"import \"math\" \
rule test { \
Expand Down

0 comments on commit 94b7da9

Please sign in to comment.