mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
removed order-of-evaluation ambiguity from new BTest
This commit is contained in:
parent
434a7e059d
commit
3addda28d3
1 changed files with 12 additions and 4 deletions
|
@ -80,10 +80,18 @@ global tbl: table[R] of R;
|
|||
{
|
||||
print seq, "populating table, expecting 8 my_seq() invocations";
|
||||
|
||||
tbl[R()] = R();
|
||||
tbl[R()] = R();
|
||||
tbl[R()] = R();
|
||||
tbl[R()] = R();
|
||||
# The following structure is used to avoid order-of-evaluation
|
||||
# ambiguity. If we use "tbl[R()] = R()" statements then script
|
||||
# optimization might create different table indices/values than
|
||||
# interpreted execution.
|
||||
local v = R();
|
||||
tbl[R()] = v;
|
||||
v = R();
|
||||
tbl[R()] = v;
|
||||
v = R();
|
||||
tbl[R()] = v;
|
||||
v = R();
|
||||
tbl[R()] = v;
|
||||
|
||||
print seq, "iterating table, expecting no my_seq() invocations";
|
||||
for ( [r1], r2 in tbl )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue