Commit graph

9 commits

Author SHA1 Message Date
Christian Kreibich
92c1098e97 Support table deserialization in from_json()
This allows additional data roundtripping through JSON since to_json() already
supports tables. There are some subtleties around the formatting of strings in
JSON object keys, for which this adds a bit of helper infrastructure.

This also expands the language.table test to verify the roundtrips, and adapts
bif.from_json to include a table in the test record.
2024-07-02 14:46:16 -07:00
Vern Paxson
5569d81953 ensure that language tests pay attention to .stderr 2022-07-29 21:30:40 -07:00
Christian Kreibich
a8ab977b0e Expand table/set tests to cover new index types 2021-10-01 14:03:08 -07:00
Christian Kreibich
cfcf1f83cc Add btests for new functionality
- Expand language.set to cover sets of sets
- Expand language.table to cover tables indexed with tables
- Add language.table-nested-set-ordering to capture the reproducer from GHI-1753
2021-09-20 17:51:43 -07:00
Christian Kreibich
0b674eb851 Baseline refresh to reflect btest 0.64 2020-12-06 20:19:49 -08:00
Jon Siwek
56e359ca9d Fix ambiguity between composite table index and record ctor expressions.
For tables of a composite index type with the first type being a
record, membership checks with an inline index key could be
misinterpreted as a record constructor instead of an expression list.
E.g, if the table type is "global t = table[conn_id, bool] of count",
then checking membership like "[c$id, is_orig] in t" now works.

Addresses #80.
2012-11-16 12:43:39 -06:00
Daniel Thayer
d5bf5eb38c Add more language tests 2012-09-04 17:39:00 -05:00
Daniel Thayer
05ad3f95af Add more language tests
Added more tests and fixed a broken test.
2012-08-31 14:05:02 -05:00
Daniel Thayer
90281a2423 Add tests of the Bro scripting language
Added tests of all built-in Bro data types (including different
representations of constant values, and max./min. values), keywords, and
operators (including special properties of certain operators, such as
short-circuit evaluation and associativity).
2012-08-24 11:32:49 -05:00