diff --git a/vunit/vhdl/check/src/check-2008p.vhd b/vunit/vhdl/check/src/check-2008p.vhd index 1e4d6aece..7900b6ad3 100644 --- a/vunit/vhdl/check/src/check-2008p.vhd +++ b/vunit/vhdl/check/src/check-2008p.vhd @@ -69,7 +69,7 @@ package body check_2008p_pkg is checker, p_std_msg( "Equality check passed", msg, - "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & "."), + "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & "."), path_offset + 1, line_num, file_name); else passing_check(checker); @@ -80,8 +80,8 @@ package body check_2008p_pkg is checker, p_std_msg( "Equality check failed", msg, - "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ". " & - "Expected " & to_string(expected) & " (" & to_string(to_real(expected)) & ")" & "."), + "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ". " & + "Expected " & to_string(expected) & " (" & to_string(to_real(expected), "%f") & ")" & "."), level, path_offset + 1, line_num, file_name); end if; -- pragma translate_on @@ -157,8 +157,8 @@ package body check_2008p_pkg is msg => msg, std_pass_msg => "Equality check passed", std_fail_msg => "Equality check failed", - std_pass_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ".", - std_fail_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ". Expected " & to_string(expected) & " (" & to_string(to_real(expected)) & ")" & ".", + std_pass_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ".", + std_fail_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ". Expected " & to_string(expected) & " (" & to_string(to_real(expected), "%f") & ")" & ".", level => level, path_offset => path_offset + 1, line_num => line_num, @@ -234,7 +234,7 @@ package body check_2008p_pkg is checker, p_std_msg( "Equality check passed", msg, - "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & "."), + "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & "."), path_offset + 1, line_num, file_name); else passing_check(checker); @@ -245,8 +245,8 @@ package body check_2008p_pkg is checker, p_std_msg( "Equality check failed", msg, - "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ". " & - "Expected " & to_string(expected) & "."), + "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ". " & + "Expected " & to_string(expected, "%f") & "."), level, path_offset + 1, line_num, file_name); end if; -- pragma translate_on @@ -322,8 +322,8 @@ package body check_2008p_pkg is msg => msg, std_pass_msg => "Equality check passed", std_fail_msg => "Equality check failed", - std_pass_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ".", - std_fail_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ". Expected " & to_string(expected) & ".", + std_pass_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ".", + std_fail_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ". Expected " & to_string(expected, "%f") & ".", level => level, path_offset => path_offset + 1, line_num => line_num, @@ -399,7 +399,7 @@ package body check_2008p_pkg is checker, p_std_msg( "Equality check passed", msg, - "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & "."), + "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & "."), path_offset + 1, line_num, file_name); else passing_check(checker); @@ -410,8 +410,8 @@ package body check_2008p_pkg is checker, p_std_msg( "Equality check failed", msg, - "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ". " & - "Expected " & to_string(expected) & " (" & to_string(to_real(expected)) & ")" & "."), + "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ". " & + "Expected " & to_string(expected) & " (" & to_string(to_real(expected), "%f") & ")" & "."), level, path_offset + 1, line_num, file_name); end if; -- pragma translate_on @@ -487,8 +487,8 @@ package body check_2008p_pkg is msg => msg, std_pass_msg => "Equality check passed", std_fail_msg => "Equality check failed", - std_pass_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ".", - std_fail_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ". Expected " & to_string(expected) & " (" & to_string(to_real(expected)) & ")" & ".", + std_pass_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ".", + std_fail_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ". Expected " & to_string(expected) & " (" & to_string(to_real(expected), "%f") & ")" & ".", level => level, path_offset => path_offset + 1, line_num => line_num, @@ -564,7 +564,7 @@ package body check_2008p_pkg is checker, p_std_msg( "Equality check passed", msg, - "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & "."), + "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & "."), path_offset + 1, line_num, file_name); else passing_check(checker); @@ -575,8 +575,8 @@ package body check_2008p_pkg is checker, p_std_msg( "Equality check failed", msg, - "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ". " & - "Expected " & to_string(expected) & "."), + "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ". " & + "Expected " & to_string(expected, "%f") & "."), level, path_offset + 1, line_num, file_name); end if; -- pragma translate_on @@ -652,8 +652,8 @@ package body check_2008p_pkg is msg => msg, std_pass_msg => "Equality check passed", std_fail_msg => "Equality check failed", - std_pass_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ".", - std_fail_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got)) & ")" & ". Expected " & to_string(expected) & ".", + std_pass_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ".", + std_fail_ctx => "Got " & to_string(got) & " (" & to_string(to_real(got), "%f") & ")" & ". Expected " & to_string(expected, "%f") & ".", level => level, path_offset => path_offset + 1, line_num => line_num, diff --git a/vunit/vhdl/check/test/tb_check_equal-2008p.vhd b/vunit/vhdl/check/test/tb_check_equal-2008p.vhd index 3f5bd5353..e25a6b0a6 100644 --- a/vunit/vhdl/check/test/tb_check_equal-2008p.vhd +++ b/vunit/vhdl/check/test/tb_check_equal-2008p.vhd @@ -51,16 +51,16 @@ begin mock(check_logger); check_equal(ufixed'(from_hstring("A5A5A5A5A", 31, -4)), ufixed'(from_hstring("B5A5A5A5A", 31, -4))); - check_only_log(check_logger, "Equality check failed - Got 10100101101001011010010110100101.1010 (2.7791e+09). Expected 10110101101001011010010110100101.1010 (3.04753e+09).", default_level); + check_only_log(check_logger, "Equality check failed - Got 10100101101001011010010110100101.1010 (2779096485.625000). Expected 10110101101001011010010110100101.1010 (3047531941.625000).", default_level); - check_equal(ufixed'(from_hstring("A5A5A5A5A", 31, -4)), 3.04753e+09); - check_only_log(check_logger, "Equality check failed - Got 10100101101001011010010110100101.1010 (2.7791e+09). Expected 3.04753e+09.", default_level); + check_equal(ufixed'(from_hstring("A5A5A5A5A", 31, -4)), 3047531941.625); + check_only_log(check_logger, "Equality check failed - Got 10100101101001011010010110100101.1010 (2779096485.625000). Expected 3047531941.625000.", default_level); check_equal(sfixed'(from_hstring("A5A5A5A5A", 31, -4)), sfixed'(from_hstring("B5A5A5A5A", 31, -4))); - check_only_log(check_logger, "Equality check failed - Got 10100101101001011010010110100101.1010 (-1.51587e+09). Expected 10110101101001011010010110100101.1010 (-1.24744e+09).", default_level); + check_only_log(check_logger, "Equality check failed - Got 10100101101001011010010110100101.1010 (-1515870810.375000). Expected 10110101101001011010010110100101.1010 (-1247435354.375000).", default_level); - check_equal(sfixed'(from_hstring("A5A5A5A5A", 31, -4)), -1.24744e+09); - check_only_log(check_logger, "Equality check failed - Got 10100101101001011010010110100101.1010 (-1.51587e+09). Expected -1.24744e+09.", default_level); + check_equal(sfixed'(from_hstring("A5A5A5A5A", 31, -4)), -1247435354.375); + check_only_log(check_logger, "Equality check failed - Got 10100101101001011010010110100101.1010 (-1515870810.375000). Expected -1247435354.375000.", default_level); unmock(check_logger); verify_passed_checks(stat, 2); verify_failed_checks(stat, 4); @@ -95,30 +95,30 @@ begin elsif run("Test pass message on ufixed equal ufixed") then mock(check_logger); check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("A5", 3, -4))); - check_only_log(check_logger, "Equality check passed - Got 1010.0101 (10.3125).", pass); + check_only_log(check_logger, "Equality check passed - Got 1010.0101 (10.312500).", pass); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("A5", 3, -4))); assert_true( - to_string(check_result.p_msg) = "Equality check passed - Got 1010.0101 (10.3125).", + to_string(check_result.p_msg) = "Equality check passed - Got 1010.0101 (10.312500).", "Got: " & to_string(check_result.p_msg) ); assert_true(check_result.p_level = pass); check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("A5", 3, -4)), ""); - check_only_log(check_logger, "Got 1010.0101 (10.3125).", pass); + check_only_log(check_logger, "Got 1010.0101 (10.312500).", pass); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("A5", 3, -4)), ""); - assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (10.3125)."); + assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (10.312500)."); assert_true(check_result.p_level = pass); check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("A5", 3, -4)), "Checking my data"); - check_only_log(check_logger, "Checking my data - Got 1010.0101 (10.3125).", pass); + check_only_log(check_logger, "Checking my data - Got 1010.0101 (10.312500).", pass); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("A5", 3, -4)), "Checking my data"); - assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (10.3125)."); + assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (10.312500)."); assert_true(check_result.p_level = pass); check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("A5", 3, -4)), result("for my data")); - check_only_log(check_logger, "Equality check passed for my data - Got 1010.0101 (10.3125).", pass); + check_only_log(check_logger, "Equality check passed for my data - Got 1010.0101 (10.312500).", pass); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("A5", 3, -4)), result("for my data")); - assert_true(to_string(check_result.p_msg) = "Equality check passed for my data - Got 1010.0101 (10.3125)."); + assert_true(to_string(check_result.p_msg) = "Equality check passed for my data - Got 1010.0101 (10.312500)."); assert_true(check_result.p_level = pass); unmock(check_logger); @@ -126,51 +126,51 @@ begin get_checker_stat(stat); mock(check_logger); check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4))); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625).", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4))); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4)), ""); - check_only_log(check_logger, "Got 1010.0101 (10.3125). Expected 0101.1010 (5.625).", default_level); + check_only_log(check_logger, "Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4)), ""); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (10.3125). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4)), "Checking my data"); - check_only_log(check_logger, "Checking my data - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625).", default_level); + check_only_log(check_logger, "Checking my data - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4)), "Checking my data"); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4)), result("for my data")); - check_only_log(check_logger, "Equality check failed for my data - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625).", + check_only_log(check_logger, "Equality check failed for my data - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4)), result("for my data")); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed for my data - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Equality check failed for my data - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(passed, ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4))); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625).", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000).", default_level); passed := check_equal(ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4))); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625).", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000).", default_level); unmock(check_logger); verify_passed_checks(stat, 0); @@ -180,21 +180,21 @@ begin get_checker_stat(my_checker, stat); mock(my_logger); check_equal(my_checker, ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4))); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625).", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(my_checker, ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4))); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = my_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(my_checker, passed, ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4))); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625).", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000).", default_level); passed := check_equal(my_checker, ufixed'(from_hstring("A5", 3, -4)), ufixed'(from_hstring("5A", 3, -4))); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 0101.1010 (5.625).", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 0101.1010 (5.625000).", default_level); unmock(my_logger); verify_passed_checks(my_checker, stat, 0); @@ -243,30 +243,30 @@ begin elsif run("Test pass message on ufixed equal real") then mock(check_logger); check_equal(ufixed'(from_hstring("A5", 3, -4)), 10.3125); - check_only_log(check_logger, "Equality check passed - Got 1010.0101 (10.3125).", pass); + check_only_log(check_logger, "Equality check passed - Got 1010.0101 (10.312500).", pass); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), 10.3125); assert_true( - to_string(check_result.p_msg) = "Equality check passed - Got 1010.0101 (10.3125).", + to_string(check_result.p_msg) = "Equality check passed - Got 1010.0101 (10.312500).", "Got: " & to_string(check_result.p_msg) ); assert_true(check_result.p_level = pass); check_equal(ufixed'(from_hstring("A5", 3, -4)), 10.3125, ""); - check_only_log(check_logger, "Got 1010.0101 (10.3125).", pass); + check_only_log(check_logger, "Got 1010.0101 (10.312500).", pass); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), 10.3125, ""); - assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (10.3125)."); + assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (10.312500)."); assert_true(check_result.p_level = pass); check_equal(ufixed'(from_hstring("A5", 3, -4)), 10.3125, "Checking my data"); - check_only_log(check_logger, "Checking my data - Got 1010.0101 (10.3125).", pass); + check_only_log(check_logger, "Checking my data - Got 1010.0101 (10.312500).", pass); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), 10.3125, "Checking my data"); - assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (10.3125)."); + assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (10.312500)."); assert_true(check_result.p_level = pass); check_equal(ufixed'(from_hstring("A5", 3, -4)), 10.3125, result("for my data")); - check_only_log(check_logger, "Equality check passed for my data - Got 1010.0101 (10.3125).", pass); + check_only_log(check_logger, "Equality check passed for my data - Got 1010.0101 (10.312500).", pass); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), 10.3125, result("for my data")); - assert_true(to_string(check_result.p_msg) = "Equality check passed for my data - Got 1010.0101 (10.3125)."); + assert_true(to_string(check_result.p_msg) = "Equality check passed for my data - Got 1010.0101 (10.312500)."); assert_true(check_result.p_level = pass); unmock(check_logger); @@ -274,51 +274,51 @@ begin get_checker_stat(stat); mock(check_logger); check_equal(ufixed'(from_hstring("A5", 3, -4)), 5.625); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 5.625.", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 5.625000.", default_level); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), 5.625); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (10.3125). Expected 5.625."); + assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (10.312500). Expected 5.625000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(ufixed'(from_hstring("A5", 3, -4)), 5.625, ""); - check_only_log(check_logger, "Got 1010.0101 (10.3125). Expected 5.625.", default_level); + check_only_log(check_logger, "Got 1010.0101 (10.312500). Expected 5.625000.", default_level); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), 5.625, ""); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (10.3125). Expected 5.625."); + assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (10.312500). Expected 5.625000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(ufixed'(from_hstring("A5", 3, -4)), 5.625, "Checking my data"); - check_only_log(check_logger, "Checking my data - Got 1010.0101 (10.3125). Expected 5.625.", default_level); + check_only_log(check_logger, "Checking my data - Got 1010.0101 (10.312500). Expected 5.625000.", default_level); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), 5.625, "Checking my data"); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (10.3125). Expected 5.625."); + assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (10.312500). Expected 5.625000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(ufixed'(from_hstring("A5", 3, -4)), 5.625, result("for my data")); - check_only_log(check_logger, "Equality check failed for my data - Got 1010.0101 (10.3125). Expected 5.625.", + check_only_log(check_logger, "Equality check failed for my data - Got 1010.0101 (10.312500). Expected 5.625000.", default_level); check_result := check_equal(ufixed'(from_hstring("A5", 3, -4)), 5.625, result("for my data")); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed for my data - Got 1010.0101 (10.3125). Expected 5.625."); + assert_true(to_string(check_result.p_msg) = "Equality check failed for my data - Got 1010.0101 (10.312500). Expected 5.625000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(passed, ufixed'(from_hstring("A5", 3, -4)), 5.625); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 5.625.", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 5.625000.", default_level); passed := check_equal(ufixed'(from_hstring("A5", 3, -4)), 5.625); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 5.625.", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 5.625000.", default_level); unmock(check_logger); verify_passed_checks(stat, 0); @@ -328,21 +328,21 @@ begin get_checker_stat(my_checker, stat); mock(my_logger); check_equal(my_checker, ufixed'(from_hstring("A5", 3, -4)), 5.625); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 5.625.", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 5.625000.", default_level); check_result := check_equal(my_checker, ufixed'(from_hstring("A5", 3, -4)), 5.625); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = my_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (10.3125). Expected 5.625."); + assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (10.312500). Expected 5.625000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(my_checker, passed, ufixed'(from_hstring("A5", 3, -4)), 5.625); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 5.625.", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 5.625000.", default_level); passed := check_equal(my_checker, ufixed'(from_hstring("A5", 3, -4)), 5.625); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.3125). Expected 5.625.", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (10.312500). Expected 5.625000.", default_level); unmock(my_logger); verify_passed_checks(my_checker, stat, 0); @@ -391,30 +391,30 @@ begin elsif run("Test pass message on sfixed equal sfixed") then mock(check_logger); check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("A5", 3, -4))); - check_only_log(check_logger, "Equality check passed - Got 1010.0101 (-5.6875).", pass); + check_only_log(check_logger, "Equality check passed - Got 1010.0101 (-5.687500).", pass); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("A5", 3, -4))); assert_true( - to_string(check_result.p_msg) = "Equality check passed - Got 1010.0101 (-5.6875).", + to_string(check_result.p_msg) = "Equality check passed - Got 1010.0101 (-5.687500).", "Got: " & to_string(check_result.p_msg) ); assert_true(check_result.p_level = pass); check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("A5", 3, -4)), ""); - check_only_log(check_logger, "Got 1010.0101 (-5.6875).", pass); + check_only_log(check_logger, "Got 1010.0101 (-5.687500).", pass); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("A5", 3, -4)), ""); - assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (-5.6875)."); + assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (-5.687500)."); assert_true(check_result.p_level = pass); check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("A5", 3, -4)), "Checking my data"); - check_only_log(check_logger, "Checking my data - Got 1010.0101 (-5.6875).", pass); + check_only_log(check_logger, "Checking my data - Got 1010.0101 (-5.687500).", pass); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("A5", 3, -4)), "Checking my data"); - assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (-5.6875)."); + assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (-5.687500)."); assert_true(check_result.p_level = pass); check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("A5", 3, -4)), result("for my data")); - check_only_log(check_logger, "Equality check passed for my data - Got 1010.0101 (-5.6875).", pass); + check_only_log(check_logger, "Equality check passed for my data - Got 1010.0101 (-5.687500).", pass); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("A5", 3, -4)), result("for my data")); - assert_true(to_string(check_result.p_msg) = "Equality check passed for my data - Got 1010.0101 (-5.6875)."); + assert_true(to_string(check_result.p_msg) = "Equality check passed for my data - Got 1010.0101 (-5.687500)."); assert_true(check_result.p_level = pass); unmock(check_logger); @@ -422,51 +422,51 @@ begin get_checker_stat(stat); mock(check_logger); check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4))); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625).", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4))); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4)), ""); - check_only_log(check_logger, "Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625).", default_level); + check_only_log(check_logger, "Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4)), ""); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4)), "Checking my data"); - check_only_log(check_logger, "Checking my data - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625).", default_level); + check_only_log(check_logger, "Checking my data - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4)), "Checking my data"); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4)), result("for my data")); - check_only_log(check_logger, "Equality check failed for my data - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625).", + check_only_log(check_logger, "Equality check failed for my data - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4)), result("for my data")); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed for my data - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Equality check failed for my data - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(passed, sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4))); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625).", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000).", default_level); passed := check_equal(sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4))); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625).", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000).", default_level); unmock(check_logger); verify_passed_checks(stat, 0); @@ -476,21 +476,21 @@ begin get_checker_stat(my_checker, stat); mock(my_logger); check_equal(my_checker, sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4))); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625).", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000).", default_level); check_result := check_equal(my_checker, sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4))); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = my_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625)."); + assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000)."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(my_checker, passed, sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4))); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625).", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000).", default_level); passed := check_equal(my_checker, sfixed'(from_hstring("A5", 3, -4)), sfixed'(from_hstring("5A", 3, -4))); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected 0101.1010 (5.625).", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected 0101.1010 (5.625000).", default_level); unmock(my_logger); verify_passed_checks(my_checker, stat, 0); @@ -539,30 +539,30 @@ begin elsif run("Test pass message on sfixed equal real") then mock(check_logger); check_equal(sfixed'(from_hstring("A5", 3, -4)), -5.6875); - check_only_log(check_logger, "Equality check passed - Got 1010.0101 (-5.6875).", pass); + check_only_log(check_logger, "Equality check passed - Got 1010.0101 (-5.687500).", pass); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), -5.6875); assert_true( - to_string(check_result.p_msg) = "Equality check passed - Got 1010.0101 (-5.6875).", + to_string(check_result.p_msg) = "Equality check passed - Got 1010.0101 (-5.687500).", "Got: " & to_string(check_result.p_msg) ); assert_true(check_result.p_level = pass); check_equal(sfixed'(from_hstring("A5", 3, -4)), -5.6875, ""); - check_only_log(check_logger, "Got 1010.0101 (-5.6875).", pass); + check_only_log(check_logger, "Got 1010.0101 (-5.687500).", pass); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), -5.6875, ""); - assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (-5.6875)."); + assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (-5.687500)."); assert_true(check_result.p_level = pass); check_equal(sfixed'(from_hstring("A5", 3, -4)), -5.6875, "Checking my data"); - check_only_log(check_logger, "Checking my data - Got 1010.0101 (-5.6875).", pass); + check_only_log(check_logger, "Checking my data - Got 1010.0101 (-5.687500).", pass); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), -5.6875, "Checking my data"); - assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (-5.6875)."); + assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (-5.687500)."); assert_true(check_result.p_level = pass); check_equal(sfixed'(from_hstring("A5", 3, -4)), -5.6875, result("for my data")); - check_only_log(check_logger, "Equality check passed for my data - Got 1010.0101 (-5.6875).", pass); + check_only_log(check_logger, "Equality check passed for my data - Got 1010.0101 (-5.687500).", pass); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), -5.6875, result("for my data")); - assert_true(to_string(check_result.p_msg) = "Equality check passed for my data - Got 1010.0101 (-5.6875)."); + assert_true(to_string(check_result.p_msg) = "Equality check passed for my data - Got 1010.0101 (-5.687500)."); assert_true(check_result.p_level = pass); unmock(check_logger); @@ -570,51 +570,51 @@ begin get_checker_stat(stat); mock(check_logger); check_equal(sfixed'(from_hstring("A5", 3, -4)), -7.25); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected -7.25.", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected -7.250000.", default_level); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), -7.25); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (-5.6875). Expected -7.25."); + assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (-5.687500). Expected -7.250000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(sfixed'(from_hstring("A5", 3, -4)), -7.25, ""); - check_only_log(check_logger, "Got 1010.0101 (-5.6875). Expected -7.25.", default_level); + check_only_log(check_logger, "Got 1010.0101 (-5.687500). Expected -7.250000.", default_level); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), -7.25, ""); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (-5.6875). Expected -7.25."); + assert_true(to_string(check_result.p_msg) = "Got 1010.0101 (-5.687500). Expected -7.250000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(sfixed'(from_hstring("A5", 3, -4)), -7.25, "Checking my data"); - check_only_log(check_logger, "Checking my data - Got 1010.0101 (-5.6875). Expected -7.25.", default_level); + check_only_log(check_logger, "Checking my data - Got 1010.0101 (-5.687500). Expected -7.250000.", default_level); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), -7.25, "Checking my data"); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (-5.6875). Expected -7.25."); + assert_true(to_string(check_result.p_msg) = "Checking my data - Got 1010.0101 (-5.687500). Expected -7.250000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(sfixed'(from_hstring("A5", 3, -4)), -7.25, result("for my data")); - check_only_log(check_logger, "Equality check failed for my data - Got 1010.0101 (-5.6875). Expected -7.25.", + check_only_log(check_logger, "Equality check failed for my data - Got 1010.0101 (-5.687500). Expected -7.250000.", default_level); check_result := check_equal(sfixed'(from_hstring("A5", 3, -4)), -7.25, result("for my data")); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = default_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed for my data - Got 1010.0101 (-5.6875). Expected -7.25."); + assert_true(to_string(check_result.p_msg) = "Equality check failed for my data - Got 1010.0101 (-5.687500). Expected -7.250000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(passed, sfixed'(from_hstring("A5", 3, -4)), -7.25); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected -7.25.", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected -7.250000.", default_level); passed := check_equal(sfixed'(from_hstring("A5", 3, -4)), -7.25); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected -7.25.", + check_only_log(check_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected -7.250000.", default_level); unmock(check_logger); verify_passed_checks(stat, 0); @@ -624,21 +624,21 @@ begin get_checker_stat(my_checker, stat); mock(my_logger); check_equal(my_checker, sfixed'(from_hstring("A5", 3, -4)), -7.25); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected -7.25.", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected -7.250000.", default_level); check_result := check_equal(my_checker, sfixed'(from_hstring("A5", 3, -4)), -7.25); assert_true(not check_result.p_is_pass); assert_true(check_result.p_checker = my_checker); - assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (-5.6875). Expected -7.25."); + assert_true(to_string(check_result.p_msg) = "Equality check failed - Got 1010.0101 (-5.687500). Expected -7.250000."); assert_true(check_result.p_level = default_level); p_handle(check_result); check_equal(my_checker, passed, sfixed'(from_hstring("A5", 3, -4)), -7.25); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected -7.25.", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected -7.250000.", default_level); passed := check_equal(my_checker, sfixed'(from_hstring("A5", 3, -4)), -7.25); assert_true(not passed, "Should return pass = false on failing check"); - check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.6875). Expected -7.25.", default_level); + check_only_log(my_logger, "Equality check failed - Got 1010.0101 (-5.687500). Expected -7.250000.", default_level); unmock(my_logger); verify_passed_checks(my_checker, stat, 0); diff --git a/vunit/vhdl/check/tools/generate_check_equal_2008p.py b/vunit/vhdl/check/tools/generate_check_equal_2008p.py index 876bc2c42..356b40887 100644 --- a/vunit/vhdl/check/tools/generate_check_equal_2008p.py +++ b/vunit/vhdl/check/tools/generate_check_equal_2008p.py @@ -421,9 +421,9 @@ "to_ufixed(natural'right,30)", "to_ufixed(natural'right,30)", """ufixed'(from_hstring("5A", 3, -4))""", - "1010.0101 (10.3125)", - "1010.0101 (10.3125)", - "0101.1010 (5.625)", + "1010.0101 (10.312500)", + "1010.0101 (10.312500)", + "0101.1010 (5.625000)", ), ( "ufixed", @@ -435,9 +435,9 @@ "to_ufixed(natural'right,30)", "real(natural'right)", "5.625", - "1010.0101 (10.3125)", - "10.3125", - "5.625", + "1010.0101 (10.312500)", + "10.312500", + "5.625000", ), ( "sfixed", @@ -449,9 +449,9 @@ "to_sfixed(integer'right,31)", "to_sfixed(integer'right,31)", """sfixed'(from_hstring("5A", 3, -4))""", - "1010.0101 (-5.6875)", - "1010.0101 (-5.6875)", - "0101.1010 (5.625)", + "1010.0101 (-5.687500)", + "1010.0101 (-5.687500)", + "0101.1010 (5.625000)", ), ( "sfixed", @@ -463,9 +463,9 @@ "to_sfixed(integer'right,31)", "real(integer'right)", "-7.25", - "1010.0101 (-5.6875)", - "1010.0101 (-5.6875)", - "-7.25", + "1010.0101 (-5.687500)", + "1010.0101 (-5.687500)", + "-7.250000", ), ] @@ -482,11 +482,11 @@ def generate_impl(): impl = "" for c in combinations: t = Template(impl_template) - got_str = 'to_string(got) & " (" & to_string(to_real(got)) & ")"' + got_str = 'to_string(got) & " (" & to_string(to_real(got), "%f") & ")"' if c[1] in ["ufixed", "sfixed"]: - expected_str = 'to_string(expected) & " (" & to_string(to_real(expected)) & ")"' + expected_str = 'to_string(expected) & " (" & to_string(to_real(expected), "%f") & ")"' else: - expected_str = "to_string(expected)" + expected_str = 'to_string(expected, "%f")' impl += t.substitute( got_type=c[0], expected_type=c[1], @@ -552,23 +552,23 @@ def generate_test(): mock(check_logger); check_equal(ufixed'(from_hstring("A5A5A5A5A", 31, -4)), ufixed'(from_hstring("B5A5A5A5A", 31, -4))); check_only_log(check_logger, "\ -Equality check failed - Got 10100101101001011010010110100101.1010 (2.7791e+09). \ -Expected 10110101101001011010010110100101.1010 (3.04753e+09).", default_level); +Equality check failed - Got 10100101101001011010010110100101.1010 (2779096485.625000). \ +Expected 10110101101001011010010110100101.1010 (3047531941.625000).", default_level); - check_equal(ufixed'(from_hstring("A5A5A5A5A", 31, -4)), 3.04753e+09); + check_equal(ufixed'(from_hstring("A5A5A5A5A", 31, -4)), 3047531941.625); check_only_log(check_logger, "\ -Equality check failed - Got 10100101101001011010010110100101.1010 (2.7791e+09). \ -Expected 3.04753e+09.", default_level); +Equality check failed - Got 10100101101001011010010110100101.1010 (2779096485.625000). \ +Expected 3047531941.625000.", default_level); check_equal(sfixed'(from_hstring("A5A5A5A5A", 31, -4)), sfixed'(from_hstring("B5A5A5A5A", 31, -4))); check_only_log(check_logger, "\ -Equality check failed - Got 10100101101001011010010110100101.1010 (-1.51587e+09). \ -Expected 10110101101001011010010110100101.1010 (-1.24744e+09).", default_level); +Equality check failed - Got 10100101101001011010010110100101.1010 (-1515870810.375000). \ +Expected 10110101101001011010010110100101.1010 (-1247435354.375000).", default_level); - check_equal(sfixed'(from_hstring("A5A5A5A5A", 31, -4)), -1.24744e+09); + check_equal(sfixed'(from_hstring("A5A5A5A5A", 31, -4)), -1247435354.375); check_only_log(check_logger, "\ -Equality check failed - Got 10100101101001011010010110100101.1010 (-1.51587e+09). \ -Expected -1.24744e+09.", default_level); +Equality check failed - Got 10100101101001011010010110100101.1010 (-1515870810.375000). \ +Expected -1247435354.375000.", default_level); unmock(check_logger); verify_passed_checks(stat, 2); verify_failed_checks(stat, 4);