Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import XCTest
@testable import app
class appTests: XCTestCase {
override func setUp() {
super.setUp()
}
override func tearDown() {
super.tearDown()
}
func testStore() {
let locateModel = app.LocateModel()
locateModel.lat=1.1
locateModel.long=1.1;
locateModel.unixTime=1;
locateModel.dateString="2016/8/2"
locateModel.title="title"
locateModel.comment="comment"
locateModel.convert();
let mapModelWrap:app.MapModelWrap = app.MapModelWrap()
mapModelWrap.store(locateModel)
}
func testList() {
let mapModelWrap:app.MapModelWrap = app.MapModelWrap()
let list = mapModelWrap.getList();
for item in list {
print(item.title)
print(item.unixTime)
print(item.dateString)
}
}
func testCount() {
let mapModelWrap:app.MapModelWrap = app.MapModelWrap()
let count = mapModelWrap.count();
print(count)
}
func testPerformanceExample() {
self.measureBlock {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.