mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-05 20:46:55 +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,14 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import XCTest
|
||||
import Testing
|
||||
|
||||
@testable import FlatBuffers
|
||||
|
||||
final class FlatBuffersDoubleTests: XCTestCase {
|
||||
struct FlatBuffersDoubleTests {
|
||||
|
||||
let country = "Norway"
|
||||
|
||||
@Test
|
||||
func testCreateFinish() {
|
||||
var b = FlatBufferBuilder(initialSize: 16)
|
||||
let countryOff = CountryDouble.createCountry(
|
||||
@@ -38,9 +39,10 @@ final class FlatBuffersDoubleTests: XCTestCase {
|
||||
97, 121, 0, 0,
|
||||
]
|
||||
// swiftformat:enable all
|
||||
XCTAssertEqual(b.sizedByteArray, v)
|
||||
#expect(b.sizedByteArray == v)
|
||||
}
|
||||
|
||||
@Test
|
||||
func testCreateFinishWithPrefix() {
|
||||
var b = FlatBufferBuilder(initialSize: 16)
|
||||
let countryOff = CountryDouble.createCountry(
|
||||
@@ -57,7 +59,7 @@ final class FlatBuffersDoubleTests: XCTestCase {
|
||||
0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0,
|
||||
]
|
||||
// swiftformat:enable all
|
||||
XCTAssertEqual(b.sizedByteArray, v)
|
||||
#expect(b.sizedByteArray == v)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user