This commit is contained in:
2026-08-17 01:21:55 +02:00
parent 5761d6e67a
commit 4bd1e24e75
265 changed files with 20617 additions and 24457 deletions
@@ -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)
}
}