Skip to content

Commit

Permalink
WIP: Augment a test case for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
reid-spencer committed May 13, 2024
1 parent f9fc2ad commit bfe6e22
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions language/src/test/input/everything.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ domain Everything is {
} described as "A simple authoring epic"

include "everything_full"

include "everything_app"
}
2 changes: 2 additions & 0 deletions language/src/test/input/everything_APlant.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ context APlant is {
from outlet Source.Commands
to inlet Sink.Commands
} explained as "A Channel"


} briefly "A bunch of data flow connections"
3 changes: 3 additions & 0 deletions language/src/test/input/everything_app.riddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
application Whatever is {
???
}
9 changes: 9 additions & 0 deletions language/src/test/input/everything_full.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ context full is {
}
}

projector ProjectIt is {
updates repository StoreIt
handler projector is {
on init {
tell command ACommand to repository StoreIt
}
}
}

command ACommand()

adaptor fromAPlant to context APlant is {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ abstract class ValidatingTest extends ParsingTest {
andThen: (PassesResult, Root, RiddlParserInput, Messages) => T
): T = {
TopLevelParser.parseInput(rpi) match {
case Left(errors) =>
fail(errors.format)
case Left(messages) =>
fail(messages.justErrors.format)
case Right(root) =>
runStandardPasses(root, options, shouldFailOnErrors) match {
case Left(errors) =>
fail(errors.format)
case Left(messages) =>
fail(messages.justErrors.format)
case Right(passesResult: PassesResult) =>
andThen(passesResult, root, rpi, passesResult.messages)
}
Expand Down

0 comments on commit bfe6e22

Please sign in to comment.