Skip to content

Commit

Permalink
Renamed enum values in simple.thrift and acompanying tests. The enum …
Browse files Browse the repository at this point in the history
…identifying part (UndefinedValues, DefinedValues, HeterogenrousValues) is being included in the const name by the thrift go generator as of previous commit.

Removed enumsiblings.thrift, as it's already being tested with simple.thrift now.
  • Loading branch information
GeertJohan committed Nov 18, 2012
1 parent 98bc146 commit fa2cfb6
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 152 deletions.
2 changes: 0 additions & 2 deletions tests/generation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ test-exercise-stamp: test-compile-stamp simple_test.go

test-compile-stamp: test-validate-stamp
cd gen-go/simple && go build -v -x .
cd gen-go/enumsiblings && go build -v -x .
touch $@

test-validate-stamp: test-generation-stamp
Expand All @@ -33,7 +32,6 @@ test-validate-stamp: test-generation-stamp

test-generation-stamp:
$(THRIFT) --gen go simple.thrift
$(THRIFT) --gen go enumsiblings.thrift
touch $@

clean:
Expand Down
12 changes: 0 additions & 12 deletions tests/generation/enumsiblings.thrift

This file was deleted.

100 changes: 50 additions & 50 deletions tests/generation/golden/gen-go/simple/ttypes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions tests/generation/simple.thrift
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
namespace java thrift4go.generated

enum UndefinedValues {
UndefinedOne,
UndefinedTwo,
UndefinedThree,
One,
Two,
Three,
}

enum DefinedValues {
DefinedOne = 1,
DefinedTwo = 2,
DefinedThree = 3,
One = 1,
Two = 2,
Three = 3,
}

enum HeterogeneousValues {
HeterogeneousOne,
HeterogeneousTwo = 2,
HeterogeneousThree,
HeterogeneousFour = 4,
One,
Two = 2,
Three,
Four = 4,
}

struct ContainerOfEnums {
Expand All @@ -26,9 +26,9 @@ struct ContainerOfEnums {
4: optional UndefinedValues optional_fourth,
5: optional DefinedValues optional_fifth,
6: optional HeterogeneousValues optional_sixth,
7: optional UndefinedValues default_seventh = UndefinedValues.UndefinedOne,
8: optional DefinedValues default_eighth = DefinedValues.DefinedOne,
9: optional HeterogeneousValues default_nineth = HeterogeneousValues.HeterogeneousOne,
7: optional UndefinedValues default_seventh = UndefinedValues.One,
8: optional DefinedValues default_eighth = DefinedValues.One,
9: optional HeterogeneousValues default_nineth = HeterogeneousValues.One,
}

service ContainerOfEnumsTestService {
Expand Down
Loading

0 comments on commit fa2cfb6

Please sign in to comment.