aboutsummaryrefslogtreecommitdiff
path: root/test/unit/eval
Commit message (Collapse)AuthorAge
* *: Provide list length when allocating listsZyX2018-01-14
|
* *: Fix linter errorsZyX2017-12-24
|
* eval: Replace some tv_list_item_remove() callsZyX2017-12-24
| | | | | There is nothing wrong with them, just it is generally better to remove a range then to remove items individually.
* eval: Rename tv_list_remove_items() to tv_list_drop_items()ZyX2017-12-24
| | | tv_list_remove_items() may cause confusion with tv_list_item_remove()
* eval/typval: Make tv_list_item_remove return pointer to the next itemZyX2017-12-24
|
* eval/typval: Remove tv_list_item_free() as it is unusedZyX2017-12-24
|
* eval/typval: Make tv_list_item_alloc staticZyX2017-12-24
| | | | Better write this bit in lua then make reviewers or clint filter out tv_list_item_alloc().
* *: Remove most calls to tv_list_item_allocZyX2017-12-24
| | | | Still left calls in eval/typval.c and test/unit/eval/helpers.lua. Latter is the only reason why function did not receive `static` modifier.
* viml/parser/expressions: Start creating expressions parserZyX2017-10-08
| | | | | | | | | | | | | | Currently supported nodes: - Register as it is one of the simplest value nodes (even numbers are not that simple with that dot handling). - Plus, both unary and binary. - Parenthesis, both nesting and calling. Note regarding unit tests: it stores data for AST in highlighting in strings in place of tables because luassert fails to do a good job at representing big tables. Squashing a bunch of data into a single string simply yields more readable result.
* unittests: Fix allocation ordering for tv_dict_add_str()ZyX2017-07-02
|
* eval/typval: Add tv_dict_add_allocated_str() functionZyX2017-07-02
|
* eval: Refactor get_user_input to support dictionaryZyX2017-05-10
|
* unittests: Add a test for TV_CSTRINGZyX2017-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not using enum{} because SIZE_MAX exceeds integer and I do not really like how enum definition is described in C99: 1. Even though all values must fit into the chosen type (6.7.2.2, p 4) the type to choose is still implementation-defined. 2. 6.4.4.3 explicitly states that “an identifier declared as an enumeration constant has type `int`”. So it looks like “no matter what type was chosen for enumeration, constants will be integers”. Yet the following simple program: #include <stdint.h> #include <stdio.h> #include <stddef.h> enum { X=SIZE_MAX }; int main(int argc, char **argv) { printf("x:%zu m:%zu t:%zu v:%zu", sizeof(X), sizeof(SIZE_MAX), sizeof(size_t), (size_t)X); } yields one of the following using different compilers: - clang/gcc/pathcc: `x:8 m:8 t:8 v:18446744073709551615` - pcc/tcc: `x:4 m:8 t:8 v:1844674407370955161` If I remove the cast of X to size_t then pcc/tcc both yield `x:4 m:8 t:8 v:4294967295`, other compilers’ output does not change. All compilers were called with `$compiler -std=c99 -xc -` (feeding program from echo), except for `tcc` which has missing `-std=c99`. `pcc` seems to ignore the argument though: it is perfectly fine with `-std=c1000`.
* Merge #6439 from ZyX-I/fix-gc-failuresJustin M. Keyes2017-04-09
|\ | | | | unittests: Force GC, fix GC failures in typval_spec
| * unittests: Move allocating vimconv_T to a functionZyX2017-04-09
| |
| * unittests: Do not GC typval_T which is owned by a diZyX2017-04-09
| |
| * unittests: Do not unref partial which is owned by Callback structureZyX2017-04-09
| |
| * unittests: Use Neovim memory allocation for vimconv_TZyX2017-04-09
| | | | | | | | Not sure whether this is going to fix things though, but core dump does not contain Neovim functions in stack in this case.
| * unittests: Do not gc what is already freedZyX2017-04-09
| |
| * unittests: Fix testlint failureZyX2017-04-07
| |
| * unittests: Force GC, fix GC failures in typval_specZyX2017-04-06
| |
* | unittests: Fix linter errorZyX2017-04-09
| |
* | unittests: Do not alter p_enc in decode unit testZyX2017-04-08
|/
* eval/typval,api/buffer: Fix review commentsZyX2017-03-29
|
* eval/typval: Allow NULL dict as tv_dict_get_callback() argumentZyX2017-03-29
| | | Also removes NULL key input: tv_dict_find() does not allow this.
* unittests: Fix linter errorsZyX2017-03-29
|
* unittests: Add tv_get_string* testsZyX2017-03-29
|
* unittests: Add tv_get number testsZyX2017-03-29
|
* unittests: Move tv_dict_add* tests to a proper describe() blockZyX2017-03-29
|
* unittests: Add tv_check… testsZyX2017-03-29
|
* unittests: Add tv_equal() testsZyX2017-03-29
|
* unittests: Test locks sectionZyX2017-03-29
|
* unittests: Test tv_copy()ZyX2017-03-29
|
* unittests: Add tests for tv_clear()ZyX2017-03-29
|
* unittests: Add test for tv_dict_set_keys_readonlyZyX2017-03-29
|
* unittests: Add tv_dict_copy testsZyX2017-03-29
|
* unittests: Add tests for tv_dict_extendZyX2017-03-29
|
* unittests: Add tv_dict_clear testsZyX2017-03-29
|
* unittests: Add tv_dict_add* unit testsZyX2017-03-29
| | | | | | | | Also fixes incorrect location of `tv_dict_add` function and three bugs in other functions: 1. `tv_dict_add_list` may free list it does not own (vim/vim#1555). 2. `tv_dict_add_dict` may free dictionary it does not own (vim/vim#1555). 3. `tv_dict_add_dict` ignores `key_len` argument.
* unittests: Add tests for dictionary indexingZyX2017-03-29
|
* unittests: Enable tv_list_join tests backZyX2017-03-29
| | | | Unable to reproduce the problem on Mac OS X Sierra VPS, need to check whether it is reproducible on travis.
* unittests: Disable tv_list_join test on Mac OS onlyZyX2017-03-29
|
* eval/typval: Fix SEGV in test_alot.vim testZyX2017-03-29
|
* unittests: Add tv_dict_item_{add,remove} testsZyX2017-03-29
|
* unittests: Add tv_dict_item_{alloc,free} testsZyX2017-03-29
|
* unittests: Add tv_dict_watcher_{add,remove} testsZyX2017-03-29
|
* unittests: Run tv_list_join tests in case it stopped failingZyX2017-03-29
|
* *: Fix some Windows-specific warningsZyX2017-03-29
| | | | Also fixed an error in path_fnamecmp().
* unittests: Add tests for tv_list_idx_of_itemZyX2017-03-29
|
* unittests: Add tests for tv_list_find*() functionsZyX2017-03-29
| | | | | | | | Additional modifications: - More `const` qualifiers in tested functions. - `tv_list_find_str()` second argument is more in-line with other `tv_list_find*()` functions.