comparison src/testdir/test_vim9_disassemble.vim @ 34006:ab6a70fad5b5 v9.0.2184

patch 9.0.2184: Vim9: inconsistent :type/:class messages Commit: https://github.com/vim/vim/commit/e75fde6b043371a188660c3423e48b1b7fd7e14b Author: Ernie Rael <errael@raelity.com> Date: Thu Dec 21 17:18:54 2023 +0100 patch 9.0.2184: Vim9: inconsistent :type/:class messages Problem: Vim9: inconsistent :type/:class messages Solution: Update the Messages (Ernie Rael) closes: #13706 Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 21 Dec 2023 17:30:05 +0100
parents 3bba09502b8d
children 5c1a025192ed
comparison
equal deleted inserted replaced
34005:f5c639a69421 34006:ab6a70fad5b5
3191 '8 RETURN object', g:instr) 3191 '8 RETURN object', g:instr)
3192 3192
3193 unlet g:instr 3193 unlet g:instr
3194 enddef 3194 enddef
3195 3195
3196 " Disassemble instructions for ISN_COMPARECLASS and ISN_COMPAREOBJECT 3196 " Disassemble instructions for ISN_COMPAREOBJECT
3197 def Test_disassemble_compare_class_object() 3197 def Test_disassemble_compare_class_object()
3198 var lines =<< trim END 3198 var lines =<< trim END
3199 vim9script 3199 vim9script
3200 class A 3200 class A
3201 endclass 3201 endclass
3202 class B 3202 class B
3203 endclass 3203 endclass
3204 def Foo(a: A, b: B) 3204 def Foo(a: A, b: B)
3205 if A == B
3206 endif
3207 if a == b 3205 if a == b
3208 endif 3206 endif
3209 enddef 3207 enddef
3210 g:instr = execute('disassemble Foo') 3208 g:instr = execute('disassemble Foo')
3211 END 3209 END
3212 v9.CheckScriptSuccess(lines) 3210 v9.CheckScriptSuccess(lines)
3213 assert_match('<SNR>\d*_Foo\_s*' .. 3211 assert_match('<SNR>\d*_Foo\_s*' ..
3214 'if A == B\_s*' .. 3212 'if a == b\_s*' ..
3215 '0 LOADSCRIPT A-0 from .*\_s*' .. 3213 '0 LOAD arg\[-2\]\_s*' ..
3216 '1 LOADSCRIPT B-1 from .*\_s*' .. 3214 '1 LOAD arg\[-1\]\_s*' ..
3217 '2 COMPARECLASS ==\_s*' .. 3215 '2 COMPAREOBJECT ==\_s*' ..
3218 '3 JUMP_IF_FALSE -> 4\_s*' .. 3216 '3 JUMP_IF_FALSE -> 4\_s*' ..
3219 'endif\_s*' .. 3217 'endif\_s*' ..
3220 'if a == b\_s*' .. 3218 '4 RETURN void', g:instr)
3221 '4 LOAD arg\[-2\]\_s*' ..
3222 '5 LOAD arg\[-1\]\_s*' ..
3223 '6 COMPAREOBJECT ==\_s*' ..
3224 '7 JUMP_IF_FALSE -> 8\_s*' ..
3225 'endif\_s*' ..
3226 '8 RETURN void', g:instr)
3227 unlet g:instr 3219 unlet g:instr
3228 enddef 3220 enddef
3229 3221
3230 " Disassemble instructions for ISN_CHECKTYPE with a float|number 3222 " Disassemble instructions for ISN_CHECKTYPE with a float|number
3231 def Test_checktype_float() 3223 def Test_checktype_float()