Swift: Add a test for UITextField.

This commit is contained in:
Geoffrey White
2023-04-25 22:47:48 +01:00
parent 2c28fae7e3
commit 22507c1566

View File

@@ -0,0 +1,30 @@
// --- stubs ---
class NSObject { }
class NSAttributedString: NSObject {}
class UIResponder: NSObject {}
class UIView: UIResponder {}
class UIControl: UIView {}
class UITextField: UIControl {
var text: String? {
get { nil }
set { }
}
var attributedText: NSAttributedString? {
get { nil }
set { }
}
var placeholder: String? {
get { nil }
set { }
}
}
// --- tests ---
func testUITextField(textField: UITextField) {
_ = textField.text // $ MISSING: source=local
_ = textField.attributedText // $ MISSING: source=local
_ = textField.placeholder // GOOD (not input)
_ = textField.text?.uppercased() // $ MISSING: source=local
}