Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
e73baaf9
Commit
e73baaf9
authored
Sep 3, 2019
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for BreakProcessor
parent
3d332717
No related branches found
No related tags found
1 merge request
!37
Feature/language
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/CMakeLists.txt
+2
-1
2 additions, 1 deletion
tests/CMakeLists.txt
tests/test_BreakProcessor.cpp
+20
-0
20 additions, 0 deletions
tests/test_BreakProcessor.cpp
with
22 additions
and
1 deletion
tests/CMakeLists.txt
+
2
−
1
View file @
e73baaf9
...
...
@@ -26,9 +26,10 @@ add_executable (unit_tests
test_ASTPrinter.cpp
test_ASTSymbolTableBuilder.cpp
test_ASTSymbolInitializationChecker.cpp
test_
ExecUntilBreakOrContinue
.cpp
test_
BreakProcessor
.cpp
test_BiCGStab.cpp
test_CRSMatrix.cpp
test_ExecUntilBreakOrContinue.cpp
test_FakeProcessor.cpp
test_IncDecExpressionProcessor.cpp
test_INodeProcessor.cpp
...
...
This diff is collapsed.
Click to expand it.
tests/test_BreakProcessor.cpp
0 → 100644
+
20
−
0
View file @
e73baaf9
#include
<catch2/catch.hpp>
#include
<node_processor/BreakProcessor.hpp>
#include
<rang.hpp>
TEST_CASE
(
"BreakProcessor"
,
"[language]"
)
{
rang
::
setControlMode
(
rang
::
control
::
Off
);
ExecUntilBreakOrContinue
exec_policy
;
REQUIRE
(
exec_policy
.
exec
()
==
true
);
BreakProcessor
break_processor
;
break_processor
.
execute
(
exec_policy
);
REQUIRE
(
exec_policy
.
exec
()
==
false
);
REQUIRE
(
exec_policy
.
jumpType
()
==
ExecUntilBreakOrContinue
::
JumpType
::
break_jump
);
}
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