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