Loading tests/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ SRCS = $(PROBLEM2_SRCS) $(PROBLEM3_SRCS) $(PROBLEM4_SRCS) # Object files PROBLEM2_OBJS = testProblem2.o problem2.o PROBLEM3_OBJS = testProblem3.o problem3.o PROBLEM4_OBJS = testProblem4.o problem4.o PROBLEM4_OBJS = testProblem4.o problem4.o ttt_interface/ttt.o ttt_interface/HttpConnect.o OBJS = $(PROBLEM2_OBJS) $(PROBLEM3_OBJS) $(PROBLEM4_OBJS) # Executable names Loading tests/testProblem2.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -11,14 +11,17 @@ int longestStreak(string gameBoard); bool test_2a() { string boardA = "x--------\n-x-------\n--x------\n"; if (longestStreak(boardA)!=3) string boardAp = "x--------\\n-x-------\\n--x------\\n"; if (longestStreak(boardA)!=3 && longestStreak(boardAp)!=3) return false; return true; } bool test_2b() { string boardB = "xxxx----x\n-yyyyy--y\n"; if (longestStreak(boardB)!=5) string boardBp = "xxxx----x\\n-yyyyy--y\\n"; if (longestStreak(boardB)!=5 && longestStreak(boardBp)!=5) return false; return true; } Loading Loading
tests/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ SRCS = $(PROBLEM2_SRCS) $(PROBLEM3_SRCS) $(PROBLEM4_SRCS) # Object files PROBLEM2_OBJS = testProblem2.o problem2.o PROBLEM3_OBJS = testProblem3.o problem3.o PROBLEM4_OBJS = testProblem4.o problem4.o PROBLEM4_OBJS = testProblem4.o problem4.o ttt_interface/ttt.o ttt_interface/HttpConnect.o OBJS = $(PROBLEM2_OBJS) $(PROBLEM3_OBJS) $(PROBLEM4_OBJS) # Executable names Loading
tests/testProblem2.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -11,14 +11,17 @@ int longestStreak(string gameBoard); bool test_2a() { string boardA = "x--------\n-x-------\n--x------\n"; if (longestStreak(boardA)!=3) string boardAp = "x--------\\n-x-------\\n--x------\\n"; if (longestStreak(boardA)!=3 && longestStreak(boardAp)!=3) return false; return true; } bool test_2b() { string boardB = "xxxx----x\n-yyyyy--y\n"; if (longestStreak(boardB)!=5) string boardBp = "xxxx----x\\n-yyyyy--y\\n"; if (longestStreak(boardB)!=5 && longestStreak(boardBp)!=5) return false; return true; } Loading