Compare commits
No commits in common. "0b1905429cdc010a1ea76ee5d7a9d131ce24e3eb" and "577bde6e574a5a26028d3750e468db130932f9fd" have entirely different histories.
0b1905429c
...
577bde6e57
4
Makefile
4
Makefile
@ -88,9 +88,9 @@ $(TEST_BUILD_DIR)/test_%.out: $(TEST_OBJ_DIR)/test_%.o $(OBJ_DIR)/%.o $(UNITY_OB
|
||||
$(LINK) -o $@ $? $(LDFLAGS)
|
||||
|
||||
# Run the test files.
|
||||
test: $(TARGET) $(TEST_BIN_FILES)
|
||||
test: $(TEST_BIN_FILES)
|
||||
@ echo -e "$(WHITE_BOLD)Running unit tests...$(RESETCOLOR)"
|
||||
for test in $(TEST_BIN_FILES); do ./$${test}; done
|
||||
for test in $<; do ./$${test}; done
|
||||
@ echo -e "$(WHITE_BOLD)Running validation tests...$(RESETCOLOR)"
|
||||
$(BATS) $(TEST_VAL_DIR)
|
||||
|
||||
|
@ -57,29 +57,3 @@ bin() { ./scl.out $1 | tail -n1; }
|
||||
run bin "-1/-1"
|
||||
[ "$output" = "= 1.000000" ]
|
||||
}
|
||||
|
||||
@test "order of operations" {
|
||||
run bin "1+2*3"
|
||||
[ "$output" = "= 7.000000" ]
|
||||
|
||||
run bin "2*3+1"
|
||||
[ "$output" = "= 7.000000" ]
|
||||
|
||||
run bin "6/2-1"
|
||||
[ "$output" = "= 2.000000" ]
|
||||
|
||||
run bin "1-6/2"
|
||||
[ "$output" = "= -2.000000" ]
|
||||
}
|
||||
|
||||
# Doesn't run without hanging for now.
|
||||
# @test "order of operations with parenthesis" {
|
||||
# run bin "(1+2)*3"
|
||||
# [ "$output" = "= 9.000000" ]
|
||||
#
|
||||
# run bin "-(1+2*3)"
|
||||
# [ "$output" = "= -7.000000" ]
|
||||
#
|
||||
# run bin "-(-(1+2)*3)"
|
||||
# [ "$output" = "= 9.000000" ]
|
||||
# }
|
||||
|
Loading…
x
Reference in New Issue
Block a user