Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
380f8bc4
Commit
380f8bc4
authored
7 years ago
by
Florian Angerer
Browse files
Options
Downloads
Patches
Plain Diff
Implemented test for conditional breakpoints.
parent
66fe1b82
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tck/FastRDebugTest.java
+34
-0
34 additions, 0 deletions
...est/src/com/oracle/truffle/r/test/tck/FastRDebugTest.java
with
34 additions
and
0 deletions
com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tck/FastRDebugTest.java
+
34
−
0
View file @
380f8bc4
...
...
@@ -38,6 +38,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import
org.junit.After
;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
com.oracle.truffle.api.debug.Breakpoint
;
...
...
@@ -154,6 +155,39 @@ public class FastRDebugTest {
assertEquals
(
"Factorial computed OK"
,
2
,
n
.
intValue
());
}
/**
* Test is currently ignored because of missing functionality in Truffle.
*/
@Test
@Ignore
public
void
testConditionalBreakpoint
()
throws
Throwable
{
final
Source
source
=
RSource
.
fromTextInternal
(
"main <- function() {\n"
+
" for(i in seq(10)) {\n"
+
" print(i)\n"
+
" }\n"
+
"}\n"
,
RSource
.
Internal
.
DEBUGTEST_DEBUG
);
engine
.
eval
(
source
);
run
.
addLast
(()
->
{
assertNull
(
suspendedEvent
);
assertNotNull
(
debuggerSession
);
Breakpoint
breakpoint
=
Breakpoint
.
newBuilder
(
source
).
lineIs
(
3
).
build
();
breakpoint
.
setCondition
(
"i == 5"
);
debuggerSession
.
install
(
breakpoint
);
});
assertLocation
(
3
,
"print(i)"
,
"i"
,
"5"
);
continueExecution
();
// Init before eval:
performWork
();
final
Source
evalSrc
=
RSource
.
fromTextInternal
(
"main()\n"
,
RSource
.
Internal
.
DEBUGTEST_DEBUG
);
engine
.
eval
(
evalSrc
);
assertExecutedOK
();
}
@Test
public
void
stepInStepOver
()
throws
Throwable
{
final
Source
factorial
=
createFactorial
();
...
...
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