blob: 9eca39da7a04c03e102b8c1d75b1d50244cfb56a [file] [log] [blame]
/*
:name: associative-arrays-prev
:description: Test support of associative arrays methods (prev)
:should_fail: 0
:tags: 7.9.7 7.9
:type: simulation parsing
*/
module top ();
int map [ string ];
string s;
int rc;
initial begin
map[ "hello" ] = 1;
map[ "sad" ] = 2;
map[ "world" ] = 3;
rc = map.last( s );
$display(":assert: ((%d == 1) and ('%s' == 'world'))", rc, s);
rc = map.prev( s );
$display(":assert: ((%d == 1) and ('%s' == 'sad'))", rc, s);
end
endmodule