@@ -575,25 +575,22 @@ object PathTests extends TestSuite {
575575 assert(x / " hello" == y)
576576 }
577577 test(" pathRelativizerSerializer" ) {
578- def check (name : String )(cond : => Boolean ): Unit = {
579- if (! cond) throw new java.lang.AssertionError (s " check failed: $name" )
580- }
581578 val base = os.pwd / " base"
582579 val serializer = os.Path .pathRelativizerSerializer(base)
583580 os.Path .pathSerializer.withValue(serializer) {
584581 val inBase = base / " foo" / " bar"
585582 val outside = os.pwd / " outside"
586583
587- check( " serialize string in base " ) (inBase.toString == " foo/bar" )
588- check( " serialize nio in base " ) (inBase.toNIO == java.nio.file.Paths .get(" foo/bar" ))
589- check( " serialize file in base " ) (inBase.toIO.getPath == new java.io.File (" foo/bar" ).getPath)
584+ assert (inBase.toString == " foo/bar" )
585+ assert (inBase.toNIO == java.nio.file.Paths .get(" foo/bar" ))
586+ assert (inBase.toIO.getPath == new java.io.File (" foo/bar" ).getPath)
590587
591- check( " deserialize string relative " ) (os.Path (" foo/bar" ) == inBase)
592- check( " deserialize nio relative " ) (os.Path (java.nio.file.Paths .get(" foo/bar" )) == inBase)
593- check( " deserialize file relative " ) (os.Path (new java.io.File (" foo/bar" )) == inBase)
588+ assert (os.Path (" foo/bar" ) == inBase)
589+ assert (os.Path (java.nio.file.Paths .get(" foo/bar" )) == inBase)
590+ assert (os.Path (new java.io.File (" foo/bar" )) == inBase)
594591
595- check( " serialize string outside base " ) (outside.toString == outside.wrapped.toString)
596- check( " serialize nio outside base " ) (outside.toNIO == outside.wrapped)
592+ assert (outside.toString == outside.wrapped.toString)
593+ assert (outside.toNIO == outside.wrapped)
597594 }
598595 }
599596 }
0 commit comments