update example iOS project

This commit is contained in:
Nick Fisher
2023-09-14 09:53:21 +08:00
parent f963fe6063
commit 64764106c3
4 changed files with 39 additions and 4 deletions

View File

@@ -0,0 +1,26 @@
import Flutter
import UIKit
import XCTest
@testable import polyvox_filament
// This demonstrates a simple unit test of the Swift portion of this plugin's implementation.
//
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
class RunnerTests: XCTestCase {
func testGetPlatformVersion() {
let plugin = PolyvoxFilamentPlugin()
let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: [])
let resultExpectation = expectation(description: "result block must be called.")
plugin.handle(call) { result in
XCTAssertEqual(result as! String, "iOS " + UIDevice.current.systemVersion)
resultExpectation.fulfill()
}
waitForExpectations(timeout: 1)
}
}