File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
sbe-tool/src/test/resources Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ all: example test # bench
1717# use this one output file to check that dependency as it's simple
1818DEP =src/simple/SbeMarshalling.go
1919$(DEP ) : $(SBE_JAR )
20- (cd ..; gradlew generateGolangCodecs)
20+ (cd ..; ./ gradlew generateGolangCodecs)
2121 (export GOPATH=$( GOPATH) && \
2222 cd src/simple && \
2323 go build && \
Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ func TestPresence(t *testing.T) {
2222 t .Fail ()
2323 }
2424
25+ // Check contant value is set by init func
26+ Issue483Init (issue483 )
27+ if issue483 .Constant != 1 {
28+ t .Log ("Constant's value should be 1" )
29+ t .Fail ()
30+ }
31+
2532 if issue483 .OptionalMetaAttribute (4 ) != "optional" {
2633 t .Log ("Optional attribute's presence should be 'optional'" )
2734 t .Fail ()
Original file line number Diff line number Diff line change 1313 <type name =" schemaId" primitiveType =" uint16" />
1414 <type name =" version" primitiveType =" uint16" />
1515 </composite >
16+ <enum name =" constval" encodingType =" uint8" >
17+ <validValue name =" one" >1</validValue >
18+ </enum >
1619 </types >
1720 <sbe : message name =" issue483" id =" 1" description =" issue 483 test" >
18- <field name =" unset" type =" uint64 " id =" 2" />
19- <field name =" required" type =" uint64 " id =" 3" presence =" required" />
20- <field name =" constant" type =" uint64 " id =" 4" presence =" constant" />
21- <field name =" optional" type =" uint64 " id =" 5" presence =" optional" />
21+ <field name =" unset" type =" uint8 " id =" 2" />
22+ <field name =" required" type =" uint8 " id =" 3" presence =" required" />
23+ <field name =" constant" type =" uint8 " id =" 4" presence =" constant" valueRef = " constval.one " />
24+ <field name =" optional" type =" uint8 " id =" 5" presence =" optional" />
2225 </sbe : message >
2326</sbe : messageSchema >
You can’t perform that action at this time.
0 commit comments