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
17
17
# use this one output file to check that dependency as it's simple
18
18
DEP =src/simple/SbeMarshalling.go
19
19
$(DEP ) : $(SBE_JAR )
20
- (cd ..; gradlew generateGolangCodecs)
20
+ (cd ..; ./ gradlew generateGolangCodecs)
21
21
(export GOPATH=$( GOPATH) && \
22
22
cd src/simple && \
23
23
go build && \
Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ func TestPresence(t *testing.T) {
22
22
t .Fail ()
23
23
}
24
24
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
+
25
32
if issue483 .OptionalMetaAttribute (4 ) != "optional" {
26
33
t .Log ("Optional attribute's presence should be 'optional'" )
27
34
t .Fail ()
Original file line number Diff line number Diff line change 13
13
<type name =" schemaId" primitiveType =" uint16" />
14
14
<type name =" version" primitiveType =" uint16" />
15
15
</composite >
16
+ <enum name =" constval" encodingType =" uint8" >
17
+ <validValue name =" one" >1</validValue >
18
+ </enum >
16
19
</types >
17
20
<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" />
22
25
</sbe : message >
23
26
</sbe : messageSchema >
You can’t perform that action at this time.
0 commit comments