Skip to content

Commit 7ae4ed4

Browse files
committed
Put tests from same example under same suite
1 parent 5924cb8 commit 7ae4ed4

File tree

1 file changed

+46
-44
lines changed

1 file changed

+46
-44
lines changed

src/test/scala/com/github/tomerghelber/mathematica/parser/MathematicaParserSpec.scala

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -292,58 +292,60 @@ class MathematicaParserSpec extends FunSpec with Matchers with ScalaCheckPropert
292292

293293

294294
describe("Examples from WolfRam site") {
295-
it("https://www.wolfram.com/language/gallery/implement-hello-world-in-the-cloud/ [1]") {
296-
forAll { p: MathematicaParser =>
295+
describe("https://www.wolfram.com/language/gallery/implement-hello-world-in-the-cloud/") {
296+
it("[1]") {
297+
forAll { p: MathematicaParser =>
297298

298-
val out1 = p.parse("\"Hello, World\"")
299-
out1 shouldBe StringNode("Hello, World")
299+
val out1 = p.parse("\"Hello, World\"")
300+
out1 shouldBe StringNode("Hello, World")
301+
}
300302
}
301-
}
302-
ignore("https://www.wolfram.com/language/gallery/implement-hello-world-in-the-cloud/ [2]") {
303-
forAll { p: MathematicaParser =>
304-
val out2 = p.parse("Do[Print[\"Hello, World\"], {5}]")
305-
out2 shouldBe FunctionNode(SymbolNode("Do"), Seq(
306-
FunctionNode(SymbolNode("Print"), Seq(
307-
StringNode("Hello, World")
308-
)),
309-
ListNode(Seq(
310-
NumberNode("5")
303+
ignore("[2]") {
304+
forAll { p: MathematicaParser =>
305+
val out2 = p.parse("Do[Print[\"Hello, World\"], {5}]")
306+
out2 shouldBe FunctionNode(SymbolNode("Do"), Seq(
307+
FunctionNode(SymbolNode("Print"), Seq(
308+
StringNode("Hello, World")
309+
)),
310+
ListNode(Seq(
311+
NumberNode("5")
312+
))
311313
))
312-
))
313314

315+
}
314316
}
315-
}
316-
it("https://www.wolfram.com/language/gallery/implement-hello-world-in-the-cloud/ [3]") {
317-
forAll { p: MathematicaParser =>
318-
val out3 = p.parse("CloudObject[\"Hello, World\"]")
319-
out3 shouldBe FunctionNode(SymbolNode("CloudObject"), Seq(
320-
StringNode("Hello, World"),
321-
))
317+
it("[3]") {
318+
forAll { p: MathematicaParser =>
319+
val out3 = p.parse("CloudObject[\"Hello, World\"]")
320+
out3 shouldBe FunctionNode(SymbolNode("CloudObject"), Seq(
321+
StringNode("Hello, World"),
322+
))
323+
}
322324
}
323-
}
324-
ignore("https://www.wolfram.com/language/gallery/implement-hello-world-in-the-cloud/ [4]") {
325-
forAll { p: MathematicaParser =>
326-
val out4 = p.parse(
327-
"CloudDeploy[\n" +
328-
" ExportForm[Style[Framed[\"Hello, World\", ImageMargins -> 60],\n" +
329-
" 80, Orange, FontFamily -> \"Verdana\"], \"GIF\"], \n" +
330-
" Permissions -> \"Public\"]"
331-
)
332-
out4 shouldBe FunctionNode(SymbolNode("CloudDeploy"), Seq(
333-
FunctionNode(SymbolNode("ExportForm"), Seq(
334-
FunctionNode(SymbolNode("Style"), Seq(
335-
FunctionNode(SymbolNode("Framed"), Seq(
336-
StringNode("Hello, World"),
337-
StringNode("ImageMargins -> 60"),
325+
ignore("[4]") {
326+
forAll { p: MathematicaParser =>
327+
val out4 = p.parse(
328+
"CloudDeploy[\n" +
329+
" ExportForm[Style[Framed[\"Hello, World\", ImageMargins -> 60],\n" +
330+
" 80, Orange, FontFamily -> \"Verdana\"], \"GIF\"], \n" +
331+
" Permissions -> \"Public\"]"
332+
)
333+
out4 shouldBe FunctionNode(SymbolNode("CloudDeploy"), Seq(
334+
FunctionNode(SymbolNode("ExportForm"), Seq(
335+
FunctionNode(SymbolNode("Style"), Seq(
336+
FunctionNode(SymbolNode("Framed"), Seq(
337+
StringNode("Hello, World"),
338+
StringNode("ImageMargins -> 60"),
339+
)),
340+
StringNode("80"),
341+
StringNode("Orange"),
342+
StringNode("FontFamily -> \"Verdana\""),
338343
)),
339-
StringNode("80"),
340-
StringNode("Orange"),
341-
StringNode("FontFamily -> \"Verdana\""),
344+
StringNode("GIF"),
342345
)),
343-
StringNode("GIF"),
344-
)),
345-
StringNode("Permissions -> \"Public\""),
346-
))
346+
StringNode("Permissions -> \"Public\""),
347+
))
348+
}
347349
}
348350
}
349351

0 commit comments

Comments
 (0)