blob: fae78d4c7234785e51ced2110635963dac72b47e [file] [log] [blame]
/*
:name: associative-arrays-prev
:description: Test support of associative arrays methods (prev)
:should_fail: 0
:tags: 7.9.7 7.9
*/
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