blob: 8e55bc53fe593c7673e927681df8ac437ba4e903 [file] [log] [blame]
Bram Moolenaarf0e86a02016-03-19 19:38:12 +01001" Tests for expressions.
2
3func Test_equal()
4 let base = {}
5 func base.method()
6 return 1
7 endfunc
8 func base.other() dict
9 return 1
10 endfunc
11 let instance = copy(base)
12 call assert_true(base.method == instance.method)
13 call assert_true([base.method] == [instance.method])
14 call assert_true(base.other == instance.other)
15 call assert_true([base.other] == [instance.other])
16
17 call assert_false(base.method == base.other)
18 call assert_false([base.method] == [base.other])
19 call assert_false(base.method == instance.other)
20 call assert_false([base.method] == [instance.other])
21
22 call assert_fails('echo base.method > instance.method')
23endfunc