-#AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
+#AUTOMAKE_OPTIONS = foreign 2.9 subdir-objects
NULL =
BUILT_SOURCES =
CLEANFILES =
run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
-check_PROGRAMS = bug-2803
+check_PROGRAMS = bug-2803 first-test second-test
# HMS: we may not need some of these:
LDADD = \
bug_2803_SOURCES = \
bug-2803.c \
- run-bug-2803.c \
+ run-ut-2803.c \
ut-2803.c \
$(NULL)
-$(srcdir)/run-bug-2803.c: $(srcdir)/bug-2803.c $(std_unity_list)
- $(run_unity) bug-2803.c run-bug-2803.c
+$(srcdir)/run-ut-2803.c: $(srcdir)/ut-2803.c $(std_unity_list)
+ $(run_unity) ut-2803.c run-ut-2803.c
+
+first_test_SOURCES = \
+ uglydate.c \
+ run-first-test.c \
+ $(NULL)
+
+$(srcdir)/run-first-test.c: $(srcdir)/uglydate.c $(std_unity_list)
+ $(run_unity) uglydate.c run-first-test.c
+
+second_test_SOURCES = \
+ modetoa.c \
+ run-second-test.c \
+ $(NULL)
+
+$(srcdir)/run-second-test.c: $(srcdir)/modetoa.c $(std_unity_list)
+ $(run_unity) modetoa.c run-second-test.c
+
# HMS: we may not need some of these:
#noinst_HEADERS = ntpdtest.h \
-#include "bug-2803.h"
+//#include "bug-2803.h"
#include "unity.h"
+#include "code-2803.h"
-#define VERSION 3 //change this to 5 and the test wont fail.
+#define VERSION 5 //change this to 5 and the test wont fail.
void setUp(void)
return 0;
}
*/
-int test_main( void )
+void test_main( void )
{
TEST_ASSERT_EQUAL(0, main2());
}
-void test_custom(void)
+//VERSION defined at the top of the file
+
+void test_XPASS(void) //expecting fail but passes, should we get an alert about that?
{
+ //TEST_ABORT
+ TEST_EXPECT_FAIL();
+
if(VERSION < 4 ){
TEST_FAIL_MESSAGE("expected to fail");
}
else TEST_ASSERT_EQUAL(1,1);
}
+
+void test_XFAIL(void) //expecting fail, and XFAILs
+{
+
+ TEST_EXPECT_FAIL();
+
+ if(VERSION < 4 ){
+ TEST_FAIL_MESSAGE("Expected to fail");
+ }
+
+ else TEST_ASSERT_EQUAL(1,2);
+}
+
+void test_XFAIL_WITH_MESSAGE(void) //expecting fail, and XFAILs
+{
+ //TEST_ABORT
+ TEST_EXPECT_FAIL_MESSAGE("Doesn't work on this OS");
+
+ if(VERSION < 4 ){
+ TEST_FAIL_MESSAGE("Expected to fail");
+ }
+
+ else TEST_ASSERT_EQUAL(1,2);
+}
+
+void test_main_incorrect(void){
+ TEST_ASSERT_EQUAL(3, main2());
+}
+
+void test_ignored(void){
+ //TEST_IGNORE();
+ TEST_IGNORE_MESSAGE("This test is being ignored!");
+}