提交 9d1ffe26 编写于 作者: T teaguecl

Fix error in example_1

This test case had an error:
test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWorksEvenInOurBrokenCode
It was supposed to be a list of values that are NOT in the list,
and none of them should be found.  It incorrectly included '1'
which is a value in the list.

The compile option -Wno-misleading-indentation was also added to
remove a compiler warning produced by gcc 7.3.0
上级 38c48704
...@@ -41,6 +41,7 @@ CFLAGS += -Wno-unknown-pragmas ...@@ -41,6 +41,7 @@ CFLAGS += -Wno-unknown-pragmas
CFLAGS += -Wstrict-prototypes CFLAGS += -Wstrict-prototypes
CFLAGS += -Wundef CFLAGS += -Wundef
CFLAGS += -Wold-style-definition CFLAGS += -Wold-style-definition
CFLAGS += -Wno-misleading-indentation
TARGET_BASE1=test1 TARGET_BASE1=test1
TARGET_BASE2=test2 TARGET_BASE2=test2
......
...@@ -21,7 +21,7 @@ void test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWork ...@@ -21,7 +21,7 @@ void test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWork
{ {
/* All of these should pass */ /* All of these should pass */
TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(78)); TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(78));
TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(1)); TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(2));
TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(33)); TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(33));
TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(999)); TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(999));
TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(-1)); TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(-1));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册