YoYoGames / GM-TestFramework

Repository for GameMaker's Test Framework
Other
21 stars 11 forks source link

TestFramework: "min_test" in BasicMathTestSuite is assuming an incorrect value and giving a false fail #184

Closed sihammill closed 2 weeks ago

sihammill commented 3 weeks ago

Description

Workflow artefact: https://github.com/YoYoGames/GM-TestFramework/actions/runs/11589645099#artifacts

Test code from Test Suite:

//#20 min( int64 const , int64 const , int64 const , int64 const )
_result = min(0x1122334455667788, 0x8877665544332211, 0x7FFFFFFFFFFFFFFF, 0x5566778811223344);
assert_equals(_result, 0x1122334455667788, "#20 min( int64 const , int64 const , int64 const , int64 const )");

You can jump directly to the current location of this code via this link

Logged result:

Testsuite Name: BasicMathTestSuite
Test Name: min_test
description: #20 min( int64 const , int64 const , int64 const , int64 const )
title: Assert values to be equal
stack: gml_Script_anon@103508@BasicMathTestSuite@BasicMathTestSuite:3129
actual: "@i64@8877665544332211$i64$"
expected: "@i64@1122334455667788$i64$"

Expected Change

No response

Steps To Reproduce

No repro steps available, this is a test run from the test suite stated above.

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.1100 (Betas)

Which platform(s) are you seeing the problem on?

Windows

Sample Package Attached?

Sample Project Added?

rwkay commented 3 weeks ago

The number 0x8877665544332211 is a negative number as bit 63 is set, so this is the minimum number as expected - the test is incorrect....

YYDan commented 2 weeks ago

Moved this to the repo for fixing the test

DiasFranciscoA commented 2 weeks ago

The incorrect unit test was fixed in commit:

GM-TestFramework: 037c677723b2a1c7bf8e22e7a08ae24b11489956

sihammill commented 2 weeks ago

Test Framework run for RT 2024.1100.0.700 show that this test now passes its tests.