From 9b706b009977500a195fceba74dc958419d1818c Mon Sep 17 00:00:00 2001 From: Louis Rubet Date: Sun, 23 Apr 2017 15:37:42 +0200 Subject: [PATCH] #2: corrected step determination criteria --- src/rpn-test-core.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rpn-test-core.h b/src/rpn-test-core.h index c2f2ff4..3d0f4d4 100644 --- a/src/rpn-test-core.h +++ b/src/rpn-test-core.h @@ -40,7 +40,7 @@ void program::test() cout << entry; cout << endl; } - else if (entry.substr(0,1)=="#") + else if (entry.substr(0,2)=="# ") { // indicates the status of previous test if (failed == false && tests > 0) @@ -53,6 +53,7 @@ void program::test() is_test_error_shown = false; cout << test_title; } + // treat "-> stack size should be " else if (entry.find(stack_size, 0) == 0) { // count test and step @@ -84,6 +85,7 @@ void program::test() } is_first_step = false; } + // treat "-> stack should be " else if (entry.find(stack_value, 0) == 0) { // count test @@ -122,6 +124,7 @@ void program::test() } is_first_step = false; } + // treat "-> error should be " else if (entry.find(cmd_error, 0) == 0) { // count test