diff --git a/nix/overlays/haskell-packages.nix b/nix/overlays/haskell-packages.nix index 5acb8821..311d8f39 100644 --- a/nix/overlays/haskell-packages.nix +++ b/nix/overlays/haskell-packages.nix @@ -308,8 +308,8 @@ in { source = pkgsNew.fetchFromGitHub { owner = "awakesecurity"; repo = "proto3-wire"; - rev = "6fcef0427abf4f02ec28fd041bd27c647234655b"; # 1.4.4 - sha256 = "5IoaqARYdrxkmk0r0Z0J/OaVKIH1ehyWKllCrHVvslc="; + rev = "40a907da45cf3946d91ac34799749b6e92cc86d2"; # 1.4.4 + sha256 = "8LgeDChLOpcLiBX/tRBmhan2o/TWBSdompfPoqBI7NQ="; }; in pkgsNew.haskell.lib.doJailbreak diff --git a/proto3-suite.cabal b/proto3-suite.cabal index 55c7a7f3..43ecea75 100644 --- a/proto3-suite.cabal +++ b/proto3-suite.cabal @@ -175,22 +175,24 @@ test-suite tests autogen-modules: TestProto TestProtoImport + TestProtoNegativeEnum + TestProtoNestedMessage TestProtoOneof TestProtoOneofImport TestProtoWrappers - TestProtoNestedMessage other-modules: ArbitraryGeneratedTestTypes TestCodeGen TestProto TestProtoImport - TestProtoOneof - TestProtoOneofImport - TestProtoWrappers --TestProtoLeadingDot + TestProtoNegativeEnum TestProtoNestedMessage + TestProtoOneof + TestProtoOneofImport --TestProtoProtocPlugin + TestProtoWrappers Test.Proto.Generate.Name Test.Proto.Generate.Name.Gen Test.Proto.Parse diff --git a/tests/SimpleEncodeDotProto.hs b/tests/SimpleEncodeDotProto.hs index e8267bcf..c8b4c1b8 100644 --- a/tests/SimpleEncodeDotProto.hs +++ b/tests/SimpleEncodeDotProto.hs @@ -322,7 +322,7 @@ testCase_BytesValue = do emit (Just "") [] (Just "789") emit (Just "012") ["", "", ""] (Just "") -testCase_NegativeEnum :: (?format :: Format) => IO () +testCase_NegativeEnum :: (?format :: Format, ?iterator :: Iterator) => IO () testCase_NegativeEnum = do let emit = outputMessage . TestProtoNegativeEnum.WithNegativeEnum . Enumerated . Right emit TestProtoNegativeEnum.NegativeEnumNEGATIVE_ENUM_0 diff --git a/tests/Test/Proto/ToEncoder.hs b/tests/Test/Proto/ToEncoder.hs index eb624b39..5276f8cd 100644 --- a/tests/Test/Proto/ToEncoder.hs +++ b/tests/Test/Proto/ToEncoder.hs @@ -27,6 +27,7 @@ import qualified Proto3.Suite.Form.Encode as FormE import TestProto import qualified TestProtoImport +import qualified TestProtoNegativeEnum import qualified TestProtoOneof import qualified TestProtoOneofImport import qualified TestProtoWrappers @@ -421,4 +422,9 @@ instance ToEncoder MapTest FormE.field @"key" k . FormE.field @"value" v +instance ToEncoder TestProtoNegativeEnum.WithNegativeEnum + where + toEncoder (TestProtoNegativeEnum.WithNegativeEnum f1) = FormE.fieldsToMessage $ + FormE.field @"v" f1 + #endif diff --git a/tests/decode.sh b/tests/decode.sh index 7bf77a95..fe939ddd 100755 --- a/tests/decode.sh +++ b/tests/decode.sh @@ -11,10 +11,10 @@ ghc \ "$@" \ $hsTmpDir/TestProto.hs \ $hsTmpDir/TestProtoImport.hs \ + $hsTmpDir/TestProtoNegativeEnum.hs \ $hsTmpDir/TestProtoOneof.hs \ $hsTmpDir/TestProtoOneofImport.hs \ $hsTmpDir/TestProtoWrappers.hs \ - $hsTmpDir/TestProtoNegativeEnum.hs \ tests/Test/Dhall/Orphan.hs \ tests/SimpleDecodeDotProto.hs \ >/dev/null diff --git a/tests/encode.sh b/tests/encode.sh index f23e67db..b5b1bfaf 100755 --- a/tests/encode.sh +++ b/tests/encode.sh @@ -11,10 +11,10 @@ ghc \ "$@" \ $hsTmpDir/TestProto.hs \ $hsTmpDir/TestProtoImport.hs \ + $hsTmpDir/TestProtoNegativeEnum.hs \ $hsTmpDir/TestProtoOneof.hs \ $hsTmpDir/TestProtoOneofImport.hs \ $hsTmpDir/TestProtoWrappers.hs \ - $hsTmpDir/TestProtoNegativeEnum.hs \ tests/Test/Dhall/Orphan.hs \ tests/Test/Proto/ToEncoder.hs \ tests/SimpleEncodeDotProto.hs \