Use XCTAssert instead of XCTAssertTrue
This commit is contained in:
parent
ae57042f36
commit
c18b70e7d7
4 changed files with 18 additions and 18 deletions
|
|
@ -21,9 +21,9 @@ class AdditionFieldTest: XCTestCase {
|
|||
XCTAssertEqual(field2.asString, "no content: ")
|
||||
XCTAssertEqual(field3.asString, "no title")
|
||||
|
||||
XCTAssertTrue(field1.asTuple == ("key", "value"))
|
||||
XCTAssertTrue(field2.asTuple == ("no content", ""))
|
||||
XCTAssertTrue(field3.asTuple == ("", "no title"))
|
||||
XCTAssert(field1.asTuple == ("key", "value"))
|
||||
XCTAssert(field2.asTuple == ("no content", ""))
|
||||
XCTAssert(field3.asTuple == ("", "no title"))
|
||||
}
|
||||
|
||||
func testAdditionFieldEquals() {
|
||||
|
|
|
|||
|
|
@ -13,22 +13,22 @@ import XCTest
|
|||
class ConstantsTest: XCTestCase {
|
||||
|
||||
func testIsOtpRelated() {
|
||||
XCTAssertTrue(Constants.isOtpRelated(line: "otpauth://something"))
|
||||
XCTAssertTrue(Constants.isOtpRelated(line: "otp_algorithm: algorithm"))
|
||||
XCTAssert(Constants.isOtpRelated(line: "otpauth://something"))
|
||||
XCTAssert(Constants.isOtpRelated(line: "otp_algorithm: algorithm"))
|
||||
XCTAssertFalse(Constants.isOtpRelated(line: "otp: something"))
|
||||
XCTAssertFalse(Constants.isOtpRelated(line: "otp"))
|
||||
}
|
||||
|
||||
func testIsOtpKeyword() {
|
||||
XCTAssertTrue(Constants.isOtpKeyword("otpauth"))
|
||||
XCTAssertTrue(Constants.isOtpKeyword("oTP_DigITS"))
|
||||
XCTAssert(Constants.isOtpKeyword("otpauth"))
|
||||
XCTAssert(Constants.isOtpKeyword("oTP_DigITS"))
|
||||
XCTAssertFalse(Constants.isOtpKeyword("otp"))
|
||||
XCTAssertFalse(Constants.isOtpKeyword("no keyword"))
|
||||
}
|
||||
|
||||
func testIsUnknown() {
|
||||
XCTAssertTrue(Constants.isUnknown("unknown"))
|
||||
XCTAssertTrue(Constants.isUnknown("unknown string"))
|
||||
XCTAssert(Constants.isUnknown("unknown"))
|
||||
XCTAssert(Constants.isUnknown("unknown string"))
|
||||
XCTAssertFalse(Constants.isUnknown("otp"))
|
||||
XCTAssertFalse(Constants.isUnknown("Unknown"))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@ class ParserTest: XCTestCase {
|
|||
}
|
||||
|
||||
func testGetKeyValuePair() {
|
||||
XCTAssertTrue(Parser.getKeyValuePair(from: "key: value") == ("key", "value"))
|
||||
XCTAssertTrue(Parser.getKeyValuePair(from: "a key: a value") == ("a key", "a value"))
|
||||
XCTAssertTrue(Parser.getKeyValuePair(from: "key:value") == (nil, "key:value"))
|
||||
XCTAssertTrue(Parser.getKeyValuePair(from: ": value") == (nil, "value"))
|
||||
XCTAssertTrue(Parser.getKeyValuePair(from: "key: ") == ("key", ""))
|
||||
XCTAssertTrue(Parser.getKeyValuePair(from: "otpauth://value") == ("otpauth", "otpauth://value"))
|
||||
XCTAssert(Parser.getKeyValuePair(from: "key: value") == ("key", "value"))
|
||||
XCTAssert(Parser.getKeyValuePair(from: "a key: a value") == ("a key", "a value"))
|
||||
XCTAssert(Parser.getKeyValuePair(from: "key:value") == (nil, "key:value"))
|
||||
XCTAssert(Parser.getKeyValuePair(from: ": value") == (nil, "value"))
|
||||
XCTAssert(Parser.getKeyValuePair(from: "key: ") == ("key", ""))
|
||||
XCTAssert(Parser.getKeyValuePair(from: "otpauth://value") == ("otpauth", "otpauth://value"))
|
||||
}
|
||||
|
||||
func testEmptyFiles() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue