forked from real-logic/simple-binary-encoding
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[golang] Add meta attribute PRESENCE to generated codecs. Issue real-…
- Loading branch information
1 parent
a1a6819
commit e375627
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package issue483 | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestPresence(t *testing.T) { | ||
issue483 := new(Issue483) | ||
|
||
if issue483.UnsetMetaAttribute(4) != "required" { | ||
t.Log("Unset attribute's presence should be 'required'") | ||
t.Fail() | ||
} | ||
|
||
if issue483.RequiredMetaAttribute(4) != "required" { | ||
t.Log("Required attribute's presence should be 'required'") | ||
t.Fail() | ||
} | ||
|
||
if issue483.ConstantMetaAttribute(4) != "constant" { | ||
t.Log("Constant attribute's presence should be 'constant'") | ||
t.Fail() | ||
} | ||
|
||
if issue483.OptionalMetaAttribute(4) != "optional" { | ||
t.Log("Optional attribute's presence should be 'optional'") | ||
t.Fail() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters