mirror of
https://github.com/louisrubet/rpn
synced 2025-01-01 18:20:06 +01:00
#2: corrected step determination criteria
This commit is contained in:
parent
d4a47c32ff
commit
df3042325a
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue