mirror of
https://github.com/google/flatbuffers.git
synced 2026-11-16 17:06:25 +00:00
Bigfoot
This commit is contained in:
@@ -14,13 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Testing
|
||||
import XCTest
|
||||
|
||||
@testable import FlatBuffers
|
||||
|
||||
struct FlatBuffersStructsTests {
|
||||
final class FlatBuffersStructsTests: XCTestCase {
|
||||
|
||||
@Test
|
||||
func testWritingAndMutatingBools() {
|
||||
var fbb = FlatBufferBuilder()
|
||||
let start = TestMutatingBool.startTestMutatingBool(&fbb)
|
||||
@@ -31,11 +30,11 @@ struct FlatBuffersStructsTests {
|
||||
var buffer = fbb.sizedBuffer
|
||||
let testMutatingBool: TestMutatingBool = getRoot(byteBuffer: &buffer)
|
||||
let property = testMutatingBool.mutableB
|
||||
#expect(property?.property == false)
|
||||
XCTAssertEqual(property?.property, false)
|
||||
property?.mutate(property: false)
|
||||
#expect(property?.property == false)
|
||||
XCTAssertEqual(property?.property, false)
|
||||
property?.mutate(property: true)
|
||||
#expect(property?.property == true)
|
||||
XCTAssertEqual(property?.property, true)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user