mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-05 03:07:05 +00:00
[Swift] Migrate to use Swift Testing (#9076)
* Migrating from Xctests to swift testing This migrates to the new Swift testing framework, which would allow us to always use the latest tech from swift moving forward. * Updates flag to make sure that Wasm testing works
This commit is contained in:
@@ -14,12 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import XCTest
|
||||
import Testing
|
||||
|
||||
@testable import FlatBuffers
|
||||
|
||||
final class FlatBuffersStructsTests: XCTestCase {
|
||||
struct FlatBuffersStructsTests {
|
||||
|
||||
@Test
|
||||
func testWritingAndMutatingBools() {
|
||||
var fbb = FlatBufferBuilder()
|
||||
let start = TestMutatingBool.startTestMutatingBool(&fbb)
|
||||
@@ -30,11 +31,11 @@ final class FlatBuffersStructsTests: XCTestCase {
|
||||
var buffer = fbb.sizedBuffer
|
||||
let testMutatingBool: TestMutatingBool = getRoot(byteBuffer: &buffer)
|
||||
let property = testMutatingBool.mutableB
|
||||
XCTAssertEqual(property?.property, false)
|
||||
#expect(property?.property == false)
|
||||
property?.mutate(property: false)
|
||||
XCTAssertEqual(property?.property, false)
|
||||
#expect(property?.property == false)
|
||||
property?.mutate(property: true)
|
||||
XCTAssertEqual(property?.property, true)
|
||||
#expect(property?.property == true)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user