Files
HaishinKit.swift/RTMPHaishinKit/Tests/AMF/AMFFoundationTests.swift
2025-07-13 12:43:53 +09:00

27 lines
655 B
Swift

import Foundation
import Testing
@testable import RTMPHaishinKit
@Suite struct AMFFoundationTests {
static let hello: String = "<a>hello</a>"
@Test func array() {
var array = AMFArray()
array[5] = "hoge"
if let array_5: String = array[5] as? String {
#expect(array_5 == "hoge")
}
}
@Test func xmlDocument() {
let xml = AMFXMLDocument(data: AMFFoundationTests.hello)
#expect(xml.description == AMFFoundationTests.hello)
}
@Test func xml() {
let xml = AMFXML(data: AMFFoundationTests.hello)
#expect(xml.description == AMFFoundationTests.hello)
}
}