@@ -25,28 +25,35 @@ object GoldenFixTests extends utest.TestSuite {
2525 test(" single" ) {
2626 val replaced = GoldenFix .applyToText(
2727 " 0123456789" ,
28- Seq (GoldenFix (null , " Hello" , 0 , 0 ))
28+ Seq (GoldenFix (null , new GoldenFix .Literal (" Hello" ), 0 , 0 )),
29+ utest.shaded.pprint.PPrinter .BlackWhite .apply(_).plainText
2930 )
3031 Predef .assert(replaced == " Hello0123456789" )
3132 }
3233 test(" middle" ) {
3334 val replaced = GoldenFix .applyToText(
3435 " 0123456789" ,
35- Seq (GoldenFix (null , " Hello" , 5 , 5 ))
36+ Seq (GoldenFix (null , new GoldenFix .Literal (" Hello" ), 5 , 5 )),
37+ utest.shaded.pprint.PPrinter .BlackWhite .apply(_).plainText
3638 )
3739 Predef .assert(replaced == " 01234Hello56789" )
3840 }
3941 test(" replace" ) {
4042 val replaced = GoldenFix .applyToText(
4143 " 0123456789" ,
42- Seq (GoldenFix (null , " Hello" , 4 , 6 ))
44+ Seq (GoldenFix (null , new GoldenFix .Literal (" Hello" ), 4 , 6 )),
45+ utest.shaded.pprint.PPrinter .BlackWhite .apply(_).plainText
4346 )
4447 Predef .assert(replaced == " 0123Hello6789" )
4548 }
4649 test(" replaceTwice" ) {
4750 val replaced = GoldenFix .applyToText(
4851 " 0123456789" ,
49- Seq (GoldenFix (null , " Hello" , 0 , 1 ), GoldenFix (null , " World" , 5 , 6 ))
52+ Seq (
53+ GoldenFix (null , new GoldenFix .Literal (" Hello" ), 0 , 1 ),
54+ GoldenFix (null , new GoldenFix .Literal (" World" ), 5 , 6 )
55+ ),
56+ utest.shaded.pprint.PPrinter .BlackWhite .apply(_).plainText
5057 )
5158 Predef .assert(replaced == " Hello1234World6789" )
5259 }
@@ -55,7 +62,8 @@ object GoldenFixTests extends utest.TestSuite {
5562 """ Hello
5663 |World
5764 |""" .stripMargin,
58- Seq (GoldenFix (null , " I am\n Cow" , 2 , 4 ))
65+ Seq (GoldenFix (null , new GoldenFix .Literal (" I am\n Cow" ), 2 , 4 )),
66+ utest.shaded.pprint.PPrinter .BlackWhite .apply(_).plainText
5967 )
6068 Predef .assert(
6169 replaced ==
@@ -71,9 +79,10 @@ object GoldenFixTests extends utest.TestSuite {
7179 |World
7280 |""" .stripMargin,
7381 Seq (
74- GoldenFix (null , " I am\n Cow" , 2 , 4 ),
75- GoldenFix (null , " Hear\n Me\n Moo" , 7 , 8 )
76- )
82+ GoldenFix (null , new GoldenFix .Literal (" I am\n Cow" ), 2 , 4 ),
83+ GoldenFix (null , new GoldenFix .Literal (" Hear\n Me\n Moo" ), 7 , 8 )
84+ ),
85+ utest.shaded.pprint.PPrinter .BlackWhite .apply(_).plainText
7786 )
7887 Predef .assert(
7988 replaced ==
0 commit comments