mirror of
https://github.com/HaishinKit/HaishinKit.swift.git
synced 2026-06-06 20:17:36 +00:00
31 lines
771 B
Swift
31 lines
771 B
Swift
import Foundation
|
|
import XCTest
|
|
|
|
@testable import HaishinKit
|
|
|
|
final class ASClassTests: XCTestCase {
|
|
|
|
static let hello: String = "<a>hello</a>"
|
|
|
|
func testASArray() {
|
|
var array = ASArray()
|
|
array[5] = "hoge"
|
|
if let array_0: ASUndefined = array[0] as? ASUndefined {
|
|
// XCTAssertEqual(array_0, kASUndefined)
|
|
}
|
|
if let array_5: String = array[5] as? String {
|
|
XCTAssertEqual(array_5, "hoge")
|
|
}
|
|
}
|
|
|
|
func testASXMLDocument() {
|
|
let xml = ASXMLDocument(data: ASClassTests.hello)
|
|
XCTAssertEqual(xml.description, ASClassTests.hello)
|
|
}
|
|
|
|
func testASXML() {
|
|
let xml = ASXML(data: ASClassTests.hello)
|
|
XCTAssertEqual(xml.description, ASClassTests.hello)
|
|
}
|
|
}
|