From 56339ecd6f185eafbefe90d641400d22d786dcfd Mon Sep 17 00:00:00 2001 From: "Eric P. Nusbaum" Date: Mon, 26 Aug 2024 21:38:19 -0400 Subject: [PATCH] Add Control Word to Unit Test --- MBBSEmu.Tests/CPU/FRNDINT_Tests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MBBSEmu.Tests/CPU/FRNDINT_Tests.cs b/MBBSEmu.Tests/CPU/FRNDINT_Tests.cs index 4c1f65c7..879e0cb7 100644 --- a/MBBSEmu.Tests/CPU/FRNDINT_Tests.cs +++ b/MBBSEmu.Tests/CPU/FRNDINT_Tests.cs @@ -10,13 +10,16 @@ public class FRNDINT_Tests : CpuTestBase [InlineData(0.1d, 0d)] [InlineData(1.9d, 2d)] [InlineData(-1.9d, -2d)] - [InlineData(0.5d, 1d)] + [InlineData(0.5d, 0d)] [InlineData(0.49999999d, 0d)] public void FRNDINT_Test(double ST0Value, double expectedValue) { Reset(); mbbsEmuCpuCore.FpuStack[mbbsEmuCpuRegisters.Fpu.GetStackTop()] = ST0Value; + //Set FPU Control Word to set rounding to even + mbbsEmuCpuRegisters.Fpu.ControlWord = 0x0000000C; + var instructions = new Assembler(16); instructions.frndint(); CreateCodeSegment(instructions);