diff options
author | ZyX <kp-pav@yandex.ru> | 2017-07-02 20:18:15 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-07-02 20:24:39 +0300 |
commit | 35898cff5d1d6dc60e0d7b87bfe106539453b031 (patch) | |
tree | 792ffd0899e697d2220a4b7e717ad8767d2b839b | |
parent | d5916a823a37a1c0fb1d3d2f52db7cad4107b924 (diff) | |
download | rneovim-35898cff5d1d6dc60e0d7b87bfe106539453b031.tar.gz rneovim-35898cff5d1d6dc60e0d7b87bfe106539453b031.tar.bz2 rneovim-35898cff5d1d6dc60e0d7b87bfe106539453b031.zip |
unittests: Fix allocation ordering for tv_dict_add_str()
-rw-r--r-- | test/unit/eval/typval_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/eval/typval_spec.lua b/test/unit/eval/typval_spec.lua index 33d5bb28be..bec74f05fc 100644 --- a/test/unit/eval/typval_spec.lua +++ b/test/unit/eval/typval_spec.lua @@ -1948,8 +1948,8 @@ describe('typval.c', function() eq(OK, lib.tv_dict_add_str(d, 'testt', 3, 'TEST')) local dis = dict_items(d) alloc_log:check({ + a.str(dis.tes.di_tv.vval.v_string, 'TEST'), a.di(dis.tes, 'tes'), - a.str(dis.tes.di_tv.vval.v_string, 'TEST') }) eq({test=10, tes='TEST'}, dct2tbl(d)) eq(FAIL, check_emsg(function() return lib.tv_dict_add_str(d, 'testt', 3, 'TEST') end, @@ -2007,7 +2007,7 @@ describe('typval.c', function() local dis = dict_items(d) local di = dis.TES local di_s = di.di_tv.vval.v_string - alloc_log:check({a.di(di), a.str(di_s)}) + alloc_log:check({a.str(di_s), a.di(di)}) eq({TES='tEsT'}, dct2tbl(d)) lib.tv_dict_clear(d) alloc_log:check({a.freed(di_s), a.freed(di)}) |