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