From 0cbd6e8705279022a0dd393bab441221e0369dc7 Mon Sep 17 00:00:00 2001 From: Alexandre Hamez Date: Tue, 26 Nov 2024 20:54:05 +0100 Subject: [PATCH] fix: correct names of generated enum for tests --- test/protox/parse_test.exs | 5 +++-- test/samples/README.md | 2 +- test/samples/file_descriptor_set.bin | Bin 2408 -> 2458 bytes 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/protox/parse_test.exs b/test/protox/parse_test.exs index ffd0b43c..88ba6027 100644 --- a/test/protox/parse_test.exs +++ b/test/protox/parse_test.exs @@ -9,7 +9,7 @@ defmodule Protox.ParseTest do end test "Parse FileDescriptorSet, protobuf 3 enums", %{enums: enums} do - {_, constants} = Enum.find(enums, fn {name, _} -> name == Abc.Def.ForeignEnum end) + {_, constants} = Enum.find(enums, fn {name, _} -> name == Abc.Def.MyForeignEnum end) assert constants == [{0, :FOREIGN_ZERO}, {1, :FOREIGN_ONE}, {1, :FOREIGN_ONE_BIS}] {_, constants} = Enum.find(enums, fn {name, _} -> name == Abc.Def.Proto3.NestedEnum end) @@ -26,7 +26,8 @@ defmodule Protox.ParseTest do assert field(fs, 5) == {:optional, :oneof_1_double, {:oneof, :oneof_1}, :double} assert field(fs, 6) == - {:optional, :oneof_1_foreign_enum, {:oneof, :oneof_1}, {:enum, Abc.Def.ForeignEnum}} + {:optional, :oneof_1_foreign_enum, {:oneof, :oneof_1}, + {:enum, Abc.Def.MyForeignEnum}} assert field(fs, 7) == {:optional, :oneof_1_proto2a, {:oneof, :oneof_1}, {:message, Proto2A}} diff --git a/test/samples/README.md b/test/samples/README.md index 95199fa3..22e4c953 100644 --- a/test/samples/README.md +++ b/test/samples/README.md @@ -3,5 +3,5 @@ to generate `file_descriptor_set.bin`. This file is used by the Protox.Parse test. The following command is used to generate this file: ``` -protoc --include_imports -o ./file_descriptor_set.bin ./*.proto +protoc --include_imports -o ./file_descriptor_set.bin ./proto2_extension.proto ./proto2.proto ./proto3.proto ``` diff --git a/test/samples/file_descriptor_set.bin b/test/samples/file_descriptor_set.bin index 27bd55e81f1964e0948c5bc8a0d2e32b5bdfc272..88720fe651f092218c19b78df4046199e198f9d4 100644 GIT binary patch delta 127 zcmaDMG)s8HTxO=>Y)R?-sChM?#Wb~XY$12Msrk9wMte29SrsrF^*_Cw?lcJD3 z7e{_UNoIatVvYp20;2}22U8GSq=S)h^L2K8MkOb1F3xzEIwf8%Zr9v`lFERh{E~cQ TEpIMf-^$67oc@#NFsA|l039TG delta 86 zcmV-c0IC0)6X+7Kodc6L31kBb