Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rpn_collab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QSUE Team B
rpn_collab
Commits
fc4bab29
Commit
fc4bab29
authored
5 years ago
by
Niklas Hannekotte
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into 'master'
Stack underflow exception test See merge request
!18
parents
2cf4381a
0bd1d9a9
No related branches found
Branches containing commit
No related tags found
1 merge request
!18
Stack underflow exception test
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test.cpp
+3
-5
3 additions, 5 deletions
test/test.cpp
with
3 additions
and
5 deletions
test/test.cpp
+
3
−
5
View file @
fc4bab29
...
...
@@ -51,17 +51,15 @@ TEST_CASE( "Basic power function test", "[calc]") {
REQUIRE
(
evaluate
(
"25^"
)
==
32
);
}
TEST_CASE
(
"
Parameters are misaligned and
exc
p
etion
is thrown
"
,
"[calc]"
)
{
TEST_CASE
(
"
Stack underflow
exce
p
tion
test
"
,
"[calc]"
)
{
// REQUIRE_THROWS( evaluate("40*/") );
// REQUIRE_THROWS( evaluate("14--") );
// REQUIRE_THROWS( evaluate("1+1") );
// REQUIRE_THROWS( evaluate("+11") );
// REQUIRE_THROWS( evaluate("11+3-+4") );
// REQUIRE_THROWS( evaluate("11/3*+4") );
}
TEST_CASE
(
"Two Operants in a row are detected and exception is thrown"
,
"[calc]"
)
{
//REQUIRE_THROWS( evaluate("11+3-+4") );
//REQUIRE_THROWS( evaluate("11/3*+4") );
}
TEST_CASE
(
"Unrecognized characters are detected and exception is thrown"
,
"[calc]"
)
{
REQUIRE_THROWS
(
evaluate
(
"11+3?4"
)
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment