This repository was archived by the owner on Mar 8, 2020. It is now read-only.
File tree 2 files changed +10
-11
lines changed
main/scala/org/bblfsh/client/v2
test/scala/org/bblfsh/client/v2
2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ package object v2 {
24
24
case UastBinary .toInt => UastBinary
25
25
case UastYaml .toInt => UastYaml
26
26
case _ =>
27
- println(" warning: not valid numeric format, using UastBinary" )
27
+ System .err. println(" warning: not valid numeric format, using UastBinary" )
28
28
UastBinary
29
29
}
30
30
}
@@ -46,7 +46,7 @@ package object v2 {
46
46
case ChildrenOrder .toInt => ChildrenOrder
47
47
case PositionOrder .toInt => PositionOrder
48
48
case _ =>
49
- println(" warning: not valid numeric order, using AnyOrder" )
49
+ System .err. println(" warning: not valid numeric order, using AnyOrder" )
50
50
AnyOrder
51
51
}
52
52
}
Original file line number Diff line number Diff line change @@ -80,15 +80,14 @@ class BblfshClientParseTest extends BblfshClientBaseTest {
80
80
default shouldEqual binary
81
81
}
82
82
83
- " BblfshClient.decode" should " be the inverse for ContextExt.encode" in {
84
- for (fmt <- Seq (UastBinary , UastYaml )) {
85
- val ctx : ContextExt = resp.uast.decode()
86
- val tree = ctx.root()
87
- val bytes = ctx.encode(tree, fmt)
88
- val decoded = BblfshClient .decode(bytes, fmt)
89
-
90
- ctx.root().load() shouldEqual decoded.root().load()
91
- }
83
+ " BblfshClient.decode" should " be the inverse for ContextExt.encode for binary format" in {
84
+ val fmt = UastBinary
85
+ val ctx : ContextExt = resp.uast.decode()
86
+ val tree = ctx.root()
87
+ val bytes = ctx.encode(tree, fmt)
88
+ val decoded = BblfshClient .decode(bytes, fmt)
89
+
90
+ ctx.root().load() shouldEqual decoded.root().load()
92
91
}
93
92
94
93
" BblfshClient.decode with invalid number" should " use binary format" in {
You can’t perform that action at this time.
0 commit comments