From 080e96c557e8f270ff5fbc72e2db3803b73e9dfe Mon Sep 17 00:00:00 2001 From: Rudy Huyn Date: Mon, 11 Mar 2019 20:14:46 -0700 Subject: [PATCH] Fix START_LOOP, ASSERT_NEGATIVE_TESTCASES and ASSERT_POSITIVE_TESTCASES to test all items --- src/CalculatorUnitTests/CopyPasteManagerTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CalculatorUnitTests/CopyPasteManagerTest.cpp b/src/CalculatorUnitTests/CopyPasteManagerTest.cpp index 9f3afc93..a29e7e7a 100644 --- a/src/CalculatorUnitTests/CopyPasteManagerTest.cpp +++ b/src/CalculatorUnitTests/CopyPasteManagerTest.cpp @@ -26,7 +26,7 @@ namespace CalculatorUnitTests #define ASSERT_POSITIVE_TESTCASES(func, dataSet) \ {\ int size = sizeof(dataSet)/sizeof(*dataSet);\ - while(--size)\ + while(--size >= 0)\ {\ VERIFY_ARE_EQUAL(func(dataSet[size]), dataSet[size]);\ }\ @@ -35,7 +35,7 @@ namespace CalculatorUnitTests #define ASSERT_NEGATIVE_TESTCASES(func, dataSet) \ {\ int size = sizeof(dataSet)/sizeof(*dataSet);\ - while(--size)\ + while(--size >= 0)\ {\ VERIFY_ARE_EQUAL(func(dataSet[size]), StringReference(L"NoOp"));\ }\ @@ -45,7 +45,7 @@ namespace CalculatorUnitTests #define START_LOOP(dataSet)\ {\ int size = sizeof(dataSet)/sizeof(*dataSet);\ - while(--size)\ + while(--size >= 0)\ { #define END_LOOP\