From 7732b7b6370171f8dced2935eca809466d77fba2 Mon Sep 17 00:00:00 2001 From: pfeme Date: Fri, 2 Aug 2024 12:37:32 +0200 Subject: [PATCH] s --- .../scala/zio/schema/DynamicValueSpec.scala | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/shared/src/test/scala/zio/schema/DynamicValueSpec.scala b/tests/shared/src/test/scala/zio/schema/DynamicValueSpec.scala index 26f91be2d..682710587 100644 --- a/tests/shared/src/test/scala/zio/schema/DynamicValueSpec.scala +++ b/tests/shared/src/test/scala/zio/schema/DynamicValueSpec.scala @@ -25,48 +25,48 @@ object DynamicValueSpec extends ZIOSpecDefault { }, test("round-trips Eithers") { check(SchemaGen.anyEitherAndValue) { - case (schema, a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) + case (schema: Schema[Either[_, _]], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } }, test("round-trips Tuples") { check(SchemaGen.anyTupleAndValue) { - case (schema, a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) + case (schema: Schema[(_, _)], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } }, test("round-trips Optionals") { check(SchemaGen.anyOptionalAndValue) { - case (schema, a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) + case (schema: Schema[Option[_]], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } }, test("round-trips Transform") { check(SchemaGen.anyTransformAndValue) { - case (schema, a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) + case (schema: Schema[_], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } }, test("round-trips CaseClass") { check(SchemaGen.anyCaseClassAndValue) { - case (schema, a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) + case (schema: Schema[_], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } }, test("round-trips Enum") { check(SchemaGen.anyEnumAndValue) { - case (schema, a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) + case (schema: Schema[_], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } }, test("round-trips any un-nested schema") { check(SchemaGen.anyLeafAndValue) { - case (schema, a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) + case (schema: Schema[_], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } }, test("round-trips any nested schema") { check(SchemaGen.anyTree(1).flatMap(s => DynamicValueGen.anyDynamicValueOfSchema(s).map(s -> _))) { case (schema, dynamic) => - assert(schema.fromDynamic(dynamic))(isRight) + assert(schema.asInstanceOf[Schema[_]].fromDynamic(dynamic))(isRight) } }, test("round-trips recursive data types") { check(SchemaGen.anyRecursiveTypeAndValue) { - case (schema, a) => + case (schema: Schema[_], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } }, @@ -77,12 +77,12 @@ object DynamicValueSpec extends ZIOSpecDefault { }, test("round-trips set") { check(SchemaGen.anySetAndValue) { - case (schema, a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) + case (schema: Schema[_], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } }, test("round-trips map") { check(SchemaGen.anyMapAndValue) { - case (schema, a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) + case (schema: Schema[Map[_, _]], a) => assert(schema.fromDynamic(schema.toDynamic(a)))(isRight(equalTo(a))) } } ),