diff --git a/pprint/test/src-2/test/pprint/HorizontalVersionSpecificTests.scala b/pprint/test/src-2/test/pprint/HorizontalVersionSpecificTests.scala index ed61bff..091d1c9 100644 --- a/pprint/test/src-2/test/pprint/HorizontalVersionSpecificTests.scala +++ b/pprint/test/src-2/test/pprint/HorizontalVersionSpecificTests.scala @@ -8,7 +8,8 @@ object HorizontalVersionSpecificTests extends TestSuite{ val tests = TestSuite{ test("Stream") - Check( Stream('omg, 'wtf, 'bbq), - """Stream('omg, 'wtf, 'bbq)""" + """Stream('omg, 'wtf, 'bbq)""", + """Stream(Symbol(omg), )""" ) } } diff --git a/pprint/test/src/test/pprint/HorizontalTests.scala b/pprint/test/src/test/pprint/HorizontalTests.scala index 23ef767..15b8392 100644 --- a/pprint/test/src/test/pprint/HorizontalTests.scala +++ b/pprint/test/src/test/pprint/HorizontalTests.scala @@ -1,6 +1,7 @@ package test.pprint import utest._ +import pprint.PPrinter import scala.collection.{mutable, immutable => imm} @@ -112,13 +113,22 @@ object HorizontalTests extends TestSuite{ test("Buffer") - Check( mutable.Buffer("omg", "wtf", "bbq"), """ArrayBuffer("omg", "wtf", "bbq")""", - """WrappedArray("omg", "wtf", "bbq")""" + """WrappedArray("omg", "wtf", "bbq")""", + """ArrayDeque("omg", "wtf", "bbq")""", ) - test("stream") - Check( - Stream.continually("foo"), - """Stream(foo, )""" - ) + test("stream") - { + val pprinted = fansi.Str.join( + PPrinter.BlackWhite.tokenize(Stream.continually("foo"), 100, 9999).toStream + ).plainText + + utest.assert( + pprinted == "Stream(foo, )" || + pprinted.startsWith("Stream(") && + pprinted.contains("foo") && + pprinted.contains("\n") + ) + } test("Iterable") - Check(Iterable("omg", "wtf", "bbq"), """List("omg", "wtf", "bbq")""") test("Set") - Check(Set("omg"), """Set("omg")""") @@ -151,7 +161,7 @@ object HorizontalTests extends TestSuite{ ) test("StringBuilder") - Check( - mutable.StringBuilder("example"), + new mutable.StringBuilder().append("example"), """ "example" """ ) }