zeek/testing/btest/language/incr-vec-expr.test
Jon Siwek 353393f9bd Fix segfault when incrementing whole vector values.
Also removed RefExpr::Eval(Val*) method since it was never called
(Clang emitted warning about this hiding overloaded virtual function
UnaryExpr::Eval(Frame*)) and doesn't appear to be necessary even if it
was called to avoid the default vector handling of UnaryExpr::Eval
(as the comment suggests as the intention).
2012-07-13 14:32:50 -05:00

27 lines
315 B
Text

# @TEST-EXEC: bro -b %INPUT >out
# @TEST-EXEC: btest-diff out
type rec: record {
a: count;
b: string;
c: vector of count;
};
global vec: vector of count = vector(0,0,0);
global v: rec = [$a=0, $b="test", $c=vector(1,2,3)];
print vec;
print v;
++vec;
print vec;
++v$a;
print v;
++v$c;
print v;