Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
Add diagnostics to sformatf test and list as expected MinGW failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinwhitaker committed Oct 14, 2016
1 parent c5f2236 commit d6d44d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README
Expand Up @@ -117,6 +117,7 @@ pr2509349a - MinGW cannot find /tmp
pr2590274a - MinGW has three digit exponents
pr2590274b - MinGW has three digit exponents
pr2590274c - MinGW has three digit exponents
sformatf - MinGW has three digit exponents
swrite - MinGW has three digit exponents
test_va_math - MinGW has three digit exponents
test_vams_math - MinGW has three digit exponents
Expand Down
4 changes: 4 additions & 0 deletions ivltests/sformatf.v
Expand Up @@ -35,27 +35,31 @@ initial begin
// Integers
f = $sformatf("sformatf test 1: %b %d %o %x", 8'd120, -12, 331, 120, 97);
if(f != "sformatf test 1: 01111000 -12 00000000513 00000078 97") begin
$display(f);
$display("FAILED 1");
$finish();
end

// Floats
f = $sformatf("sformatf test 2: %e %f %g", 123.45, 100e12, 100e12);
if(f != "sformatf test 2: 1.234500e+02 100000000000000.000000 1e+14") begin
$display(f);
$display("FAILED 2");
$finish();
end

// Strings
f = $sformatf("sformatf test 3: %s %c", "'string test'", 97);
if(f != "sformatf test 3: 'string test' a") begin
$display(f);
$display("FAILED 3");
$finish();
end

// Other stuff
f = $sformatf("sformatf test 4: %t %v %u %z", 120s, test_net, word, word);
if(f != "sformatf test 4: 120 Pu1 UUUU UUUU") begin
$display(f);
$display("FAILED 4");
$finish();
end
Expand Down

0 comments on commit d6d44d9

Please sign in to comment.