ZyX
a83511d1a1
unittests: Move checking cores to check_child_err
2017-04-08 04:48:58 +03:00
ZyX
271df03fa4
unittests: Force GC, fix GC failures in typval_spec
2017-04-06 07:29:15 +03:00
Nikolai Aleksandrovich Pavlov
ddfa0359c6
unittests: Make it easier to determine on which _spec line it crashed ( #6424 )
...
Benchmarks:
Before change: 17.78s user 3.48s system 94% cpu 22.525 total
After change: 25.38s user 4.46s system 101% cpu 29.317 total
2017-04-02 13:25:47 +02:00
ZyX
ac22238b6a
unittests: Replace two environment variables with one TRACE_LEVEL
2017-04-01 20:57:23 +03:00
ZyX
2d158dde02
unittests: Fix linter error
2017-04-01 13:17:25 +03:00
ZyX
708a55ee15
unittests: Disable non-C-calls
...
Some benchmarks:
TRACE_EVERYTHING: 79.45s user 12.68s system 124% cpu 1:13.94 total
(default): 30.26s user 5.30s system 89% cpu 39.663 total
2017-04-01 13:16:25 +03:00
ZyX
9dd0d4f8b9
unittests: Add trace description right to the error message
2017-04-01 12:52:28 +03:00
ZyX
046d6a8dfe
unittests: Collect traces
...
Some benchmarks:
MAIN_CDEFS + NO_TRACE: 3.81s user 1.65s system 33% cpu 16.140 total
MAIN_CDEFS: 73.61s user 10.98s system 154% cpu 54.690 total
NO_TRACE: 18.49s user 4.30s system 73% cpu 30.804 total
(default): 77.11s user 14.74s system 126% cpu 1:12.79 total
2017-04-01 12:25:10 +03:00
ZyX
8f7a48f46a
unittests: Split itp implementation into multiple functions
2017-04-01 11:19:41 +03:00
ZyX
933d60bc23
unittests: Do not hang when error message is too long
2017-04-01 11:07:08 +03:00
Nikolai Aleksandrovich Pavlov
a1c928e70c
ci: Do not hide ci directory ( #6410 )
2017-03-31 14:32:58 +02:00
ZyX
bc87d23c28
unittests: Add tests for dictionary indexing
2017-03-29 10:08:45 +03:00
ZyX
48e7a83447
unittests: Fix linter error
2017-03-12 04:20:31 +03:00
ZyX
d559fe6e93
unittests: Allow running ffi.cdef
in the main process
2017-03-12 03:14:34 +03:00
ZyX
a7f64ba517
unittests: Move filtering cdefs to main process
2017-03-12 03:02:14 +03:00
ZyX
bf68907778
unittests: Use more adequate names for some functions
2017-03-12 02:54:23 +03:00
ZyX
8ef6cfa6ac
unittests: Fix linter errors
2017-03-11 23:48:16 +03:00
ZyX
ec730daee9
unittests: Do not use which, add data to paths.lua.in instead
2017-03-11 23:23:50 +03:00
ZyX
ce12bda712
unittests: Always close all pipes
2017-03-11 23:23:49 +03:00
ZyX
e2a578f40d
unittests: Do not import libnvim or headers in main process
...
Slows down unit tests much, but gets rid of as much preserved state as possible.
2017-03-11 23:23:49 +03:00
ZyX
9400466282
unittests: Check core dumps in after_each, like in functests
2017-03-11 23:23:49 +03:00
ZyX
5898b42d82
unittests: Do not run failing test at all
2017-03-11 23:23:30 +03:00
ZyX
29ed5b3a39
unittests: Fix lint errors
2017-03-11 23:23:30 +03:00
ZyX
b442574862
unittests: Allow failing test to fail
2017-03-11 23:23:30 +03:00
ZyX
ff5dca6630
unittests: Log syscalls if requested
2017-03-11 23:23:30 +03:00
ZyX
1edb3ccc36
unittests: Use own bindings to libc syscall wrappers
2017-03-11 23:23:30 +03:00
ZyX
3adecd3ede
unittests: Do not use syscall library: does not work well with cimport
2017-03-11 23:23:30 +03:00
ZyX
9f29a76cab
unittests: Try using syscall library instead (ffi-based)
2017-03-11 23:23:30 +03:00
ZyX
b92d6aaf0d
unittests: Pause garbage collector while executing tests
...
Temporary (?) workaround for currently failing check_alloc_log tests.
2017-03-11 23:23:30 +03:00
ZyX
82e5af85c1
unittests: Run tests in a separate process
2017-03-11 23:23:30 +03:00
ZyX
77ebe85be6
buffer: Hide one of the asserts from lua parser
2017-02-25 00:22:46 +03:00
ZyX
3967618fa5
unittest: Fix linter errors
2017-01-07 19:12:18 +03:00
ZyX
8fd3d31329
unittest: Allow mocking allocator calls
2017-01-07 14:48:21 +03:00
James McCoy
b4c0c61f5c
Merge pull request #5826 from ZyX-I/fix-typval_encode
...
Refactor eval/typval_encode.h
2017-01-06 21:11:33 -05:00
ZyX
937b6fac8f
unittest: Fix linter errors
2017-01-03 22:54:55 +03:00
ZyX
2151ddbd73
unittest: Move nil checks to Gcc:preprocess
2017-01-03 22:54:54 +03:00
ZyX
0d7b779cab
unittest: Record previous defines in another place
...
Previous commit made preprocess.lua know how its output will be used. This moves
state to cimport, making only it know which is cleaner.
2017-01-03 22:54:54 +03:00
ZyX
410d18ef5c
unittest: Allow multiple indirect includes
...
Works by saving all preprocessor defines and reusing them on each run. This also
saves NVIM_HEADER_H defines. Saving other defines is needed for defines like
`Map(foo, bar)` which are sometimes used to declare types or functions. Saving
types or function declarations is not needed because they are recorded as luajit
state.
Fixes #5857
2017-01-03 22:54:54 +03:00
ZyX
136b382e64
tests: Add tests for partials dumping
...
Also fixed dumping of partials by encode_vim_to_object and added code which is
able to work with partials and dictionaries to test/unit/eval/helpers.lua
(mostly copied from #5119 , except for partials handling).
2017-01-03 22:51:29 +03:00
Marco Hinz
d2998a0a49
Tests: make unit tests work on macOS Sierra
...
Fixes #5455 .
2016-12-29 02:58:21 +01:00
ZyX
fec7983ecd
unittests: Add tests for file.c
...
Also fixes some errors found.
2016-06-24 00:07:54 +03:00
ZyX
ff470bb853
functests: Check logs in lua code
...
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.
2016-06-10 21:50:49 +03:00
Justin M. Keyes
49c5689f45
test/unit: ensure event_init()
...
Closes #4635
References #4630
References https://github.com/neovim/neovim/pull/4070#discussion_r50626558
2016-04-25 00:42:44 -04:00
ZyX
77776b09c6
eval/encode: Fix writing strings starting with NL to list
...
Error [found][1] by oni-link.
[1]: https://github.com/neovim/neovim/pull/4131/files#r52239384
2016-04-18 02:47:13 +03:00
Marco Hinz
32ecd75a16
test/unit: clean up according to luacheck
2015-11-23 13:57:21 +01:00
Thiago de Arruda
c8c5af5a7a
test: Ensure proper initialization in unit/helpers.lua
...
Remove helpers.vim_init and simply perform the required initialization in
helpers.lua.
2015-07-01 05:40:53 -03:00
John Szakmeister
235909044a
tests: require luassert in the helpers
...
This is necessary for newer versions of Busted, otherwise assert will be
nil and the tests will die.
Note: this does not mean the tests now work with the latest Busted.
There are still several issues preventing that from happening.
2015-03-01 09:00:27 -05:00
Scott Prager
275f6e3a6b
mch_early_init() -> early_init().
...
Move general initialization functions to early_init, which simplifies
test/unit/helpers.lua, which requires all these functions.
2014-11-28 14:27:58 -05:00
Stefan Hoffmann
972fc30599
unittest: increase number of retries in cimport
2014-10-30 19:05:39 +01:00
Stefan Hoffmann
741cb5be08
unittest: fix handling of pragma pack in cimport
2014-10-30 19:05:39 +01:00