File tree Expand file tree Collapse file tree 1 file changed +14
-19
lines changed
derivation/src/test/scala/io/bullet/borer/derivation Expand file tree Collapse file tree 1 file changed +14
-19
lines changed Original file line number Diff line number Diff line change @@ -428,26 +428,21 @@ abstract class DerivationSpec(target: Target) extends AbstractBorerSpec {
428428 " ADT" - {
429429 import ADT ._
430430
431- try {
432- implicit val dogCodec = deriveCodec[Dog ]
433- implicit val catCodec = deriveCodec[Cat ]
434- implicit val mouseCodec = deriveCodec[Mouse ]
435- implicit val animalCodec = deriveCodec[Animal ]
436-
437- val animals : List [Animal ] = List (
438- Dog (12 , " Fred" ),
439- Cat (weight = 1.0 , color = " none" , home = " there" ),
440- Dog (4 , " Lolle" ),
441- Mouse (true )
442- )
431+ implicit val dogCodec = deriveCodec[Dog ]
432+ implicit val catCodec = deriveCodec[Cat ]
433+ implicit val mouseCodec = deriveCodec[Mouse ]
434+ implicit val animalCodec = deriveCodec[Animal ]
443435
444- val encoded = encode(animals)
445- decode[Element ](encoded) ==> mapBasedAnimalsDom
446- decode[List [Animal ]](encoded) ==> animals
447- } catch {
448- case NonFatal (e) if target == Json =>
449- e.getMessage ==> " JSON does not support integer values as a map key (Output.ToByteArray index 124)"
450- }
436+ val animals : List [Animal ] = List (
437+ Dog (12 , " Fred" ),
438+ Cat (weight = 1.0 , color = " none" , home = " there" ),
439+ Dog (4 , " Lolle" ),
440+ Mouse (true )
441+ )
442+
443+ val encoded = encode(animals)
444+ decode[Element ](encoded) ==> mapBasedAnimalsDom
445+ decode[List [Animal ]](encoded) ==> animals
451446 }
452447
453448 " ADT Key Collision" - {
You can’t perform that action at this time.
0 commit comments