mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-04 23:37:05 +00:00
[Swift] RFC: Switch Swift namespace from public enum to ordinary concat with _ (#6045)
This PR attempts to switch namespace from public enum back to ordinary concat with _ in Swift. This kept style similar with protobuf, but different from other popular style guide in Swift. This is needed because previously, when we do `public enum`, we don't really know when to declare and when to extend (extension). With namespace implementation in this PR, there is no such ambiguity.
This commit is contained in:
@@ -62,13 +62,13 @@ final class FlatBuffersTests: XCTestCase {
|
||||
|
||||
func testWriteOptionalValues() {
|
||||
var b = FlatBufferBuilder()
|
||||
let root = optional_scalars.ScalarStuff.createScalarStuff(&b,
|
||||
let root = optional_scalars_ScalarStuff.createScalarStuff(&b,
|
||||
justI8: 80,
|
||||
maybeI8: nil,
|
||||
justU8: 100,
|
||||
maybeU8: 10)
|
||||
b.finish(offset: root)
|
||||
let scalarTable = optional_scalars.ScalarStuff.getRootAsScalarStuff(bb: b.sizedBuffer)
|
||||
let scalarTable = optional_scalars_ScalarStuff.getRootAsScalarStuff(bb: b.sizedBuffer)
|
||||
XCTAssertEqual(scalarTable.justI8, 80)
|
||||
XCTAssertNil(scalarTable.maybeI8)
|
||||
XCTAssertEqual(scalarTable.defaultI8, 42)
|
||||
|
||||
Reference in New Issue
Block a user