xref: /vim-8.2.3635/src/testdir/test_expr.vim (revision aedfcbe1)
1" 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
24