@@ -3658,7 +3658,7 @@ namespace {
36583658 checkBitfieldFit<unsigned >(subViews[2 ], 15 ) &&
36593659 testCase.returnValue .view ->getEntryValue (nullptr ) == " 13" ;
36603660 }
3661- })
3661+ })
36623662 );
36633663 }
36643664
@@ -3703,4 +3703,37 @@ namespace {
37033703 return stoi (testCase.returnValue .view ->getEntryValue (nullptr )) == 42 ;
37043704 }}));
37053705 }
3706+
3707+ TEST_F (Syntax_Test, DISABLED_int128_mult) {
3708+ auto [testGen, status] = createTestForFunction (types_c, 120 );
3709+
3710+ ASSERT_TRUE (status.ok ()) << status.error_message ();
3711+
3712+ for (const auto &testCase: testGen.tests .at (types_c).methods .begin ().value ().testCases ) {
3713+ auto res = StringUtils::stot<unsigned __int128>(
3714+ testCase.returnValue .view ->getEntryValue (nullptr ));
3715+ auto a = StringUtils::stot<unsigned long long >(
3716+ testCase.paramValues [0 ].view ->getEntryValue (nullptr ));
3717+ auto b = StringUtils::stot<unsigned long long >(
3718+ testCase.paramValues [1 ].view ->getEntryValue (nullptr ));
3719+ ASSERT_TRUE (res == ~((unsigned __int128) 0 ) || res == static_cast <unsigned __int128>(a) * b);
3720+ }
3721+
3722+ checkTestCasePredicates (
3723+ testGen.tests .at (bitfields_c).methods .begin ().value ().testCases ,
3724+ std::vector<TestCasePredicate>(
3725+ {
3726+ [](const tests::Tests::MethodTestCase &testCase) {
3727+ return StringUtils::stot<unsigned __int128>(
3728+ testCase.returnValue .view ->getEntryValue (nullptr )) ==
3729+ ~((unsigned __int128) 0 );
3730+ },
3731+ [](const tests::Tests::MethodTestCase &testCase) {
3732+ return StringUtils::stot<unsigned __int128>(
3733+ testCase.returnValue .view ->getEntryValue (nullptr )) !=
3734+ ~((unsigned __int128) 0 );
3735+ }
3736+ })
3737+ );
3738+ }
37063739}
0 commit comments