commit | 1115dd03de7baf2e032490fcbc1c84512434a580 | [log] [tgz] |
---|---|---|
author | Benj Prosnitz <bprosnitz@google.com> | Fri Jul 26 15:39:59 2019 -0400 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Tue Jul 30 21:06:50 2019 +0000 |
tree | 1ae5a21cd70a1a80baa5745279c6b232c8ffee4f | |
parent | a52eaf1244e81f4253ae30cada636a8ef99f674f [diff] |
[gidl][golang] Failure conformance test support for go Example: func TestAllEncodeFailureCases(t *testing.T) { { encodeFailureCase{ name: "StringExceedsLimit", input: &conformance.Length2StringWrapper{ Length2String: "abc", }, code: fidl.ErrStringTooLong, }.check(t) } } func TestAllDecodeFailureCases(t *testing.T) { { decodeFailureCase{ name: "NonEmptyStringWithNullPtrBody", valType: reflect.TypeOf((*conformance.StringWrapper)(nil)), bytes: []byte{ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of string data 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // invalid null pointer to content }, code: fidl.ErrUnexpectedNullRef, }.check(t) } } FIDL-557 #comment Test: ran conformance_test.go via "fx run-test go_fidl_tests" after patching the above test case into conformance_test.go (will generate this in future) Change-Id: I0b2673bcd33836967577df96202f674b18bdb6ce
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.