Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2023-10-22 18:31:48 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c65548e74f234b21063de5d5f08385a83a8b79f1
c65548e7
1 parent
22bf9886
add XCTest stubs for iOS & MacOS
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
0 deletions
example/ios/RunnerTests/RunnerTests.swift
example/macos/RunnerTests/RunnerTests.swift
example/ios/RunnerTests/RunnerTests.swift
0 → 100644
View file @
c65548e
import
Flutter
import
UIKit
import
XCTest
@testable
import
mobile_scanner
// 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
{
// TODO: this test was left as-is from the template, but it obviuosly fails for now.
// Add new tests later.
/*
func testGetPlatformVersion() {
let plugin = MobileScannerPlugin()
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)
}*/
}
...
...
example/macos/RunnerTests/RunnerTests.swift
0 → 100644
View file @
c65548e
import
FlutterMacOS
import
Cocoa
import
XCTest
@testable
import
mobile_scanner
// 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
{
// TODO: this test was left as-is from the template, but it obviuosly fails for now.
// Add new tests later.
/*
func testGetPlatformVersion() {
let plugin = MobileScannerPlugin()
let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: [])
let resultExpectation = expectation(description: "result block must be called.")
plugin.handle(call) { result in
XCTAssertEqual(result as! String,
"macOS " + ProcessInfo.processInfo.operatingSystemVersionString)
resultExpectation.fulfill()
}
waitForExpectations(timeout: 1)
}*/
}
...
...
Please
register
or
login
to post a comment