59 Commits

Author SHA1 Message Date
Erik Rauer
1628e669b6 Add a test for string/split
This adds a test for the `string/split` instruction
2021-04-15 15:12:42 -05:00
Erik Rauer
27bd7b6eb6 Add a test for string/set-char
This adds a test for the `string/set-char` instruction
2021-04-01 12:03:34 -05:00
Erik Rauer
711fc20f01 Add a test for string/reverse
This adds a test for the `string/reverse` instruction
2021-04-01 11:30:02 -05:00
Erik Rauer
7e780567ec Add test for string/rest
This adds a test for the `string/rest` instruction
2021-04-01 11:26:55 -05:00
Erik Rauer
5cc3a02002 Fix replace-char-spec to use the correct function
This changes `replace-char-spec` to actually use `check-replace-char` instead of `check-replace`
2021-04-01 11:20:40 -05:00
Erik Rauer
3cdc2f7fe5 Add a test for string/replace-first-char
This adds a test for the `string/replace-first-char` instruction
2021-04-01 11:19:09 -05:00
Erik Rauer
110679d8f7 Add a test for string/replace-first
This adds a test for the `string/replace-first` instruction
2021-04-01 11:15:40 -05:00
Erik Rauer
3fb35d7d47 Add a test for string/replace-char
This adds a test for the `string/replace-char` instruction
2021-04-01 11:12:26 -05:00
Erik Rauer
95cad31e7b Add a test for string/replace
This adds a test for the `string/replace` instruction
2021-04-01 11:07:01 -05:00
Erik Rauer
da22da5014 Add a test for string/remove-char
This adds a test for the `string/remove-char` instruction
2021-04-01 10:59:38 -05:00
Erik Rauer
95cab60576 Add a test for string/parse-to-chars
This adds a test for the `string/parse-to-chars` instruction.
2021-04-01 10:55:21 -05:00
Erik Rauer
0655a5748f Add a test for string/occurencesof_char
This adds a test for the `string/occurencesof_char` instruction.
2021-04-01 10:49:57 -05:00
Erik Rauer
8e361225ae Add test for string/nth
This adds a test for the `string/nth` instruction
2021-03-29 21:01:27 -05:00
Erik Rauer
da117c2f08 Update the test for string/length
Changes the test for the `string/length` instruction to check for an `:ignore-instruction` when the string is empty.
2021-03-23 22:47:46 -05:00
Erik Rauer
acdc225c71 Add a test for string/length
This adds a test for the `string/length` instruction
2021-03-23 22:30:18 -05:00
Erik Rauer
c270ce6c1a Add test for string/last
This adds a test for the `string/last` instruction
2021-03-23 22:18:28 -05:00
Erik Rauer
92cdfe9e59 Add a test for string/indexof-char
This adds a test for the `string/indexof-char` instruction
2021-03-21 00:39:25 -05:00
Erik Rauer
b8a011c385 Add a test for string/from-float
This adds a test for the `string/from-float` instruction
2021-03-18 23:16:41 -05:00
Erik Rauer
2da8ef6de5 Add a test for string/from-char
This adds a test for the `string/from-char` instruction
2021-03-18 23:11:31 -05:00
Erik Rauer
d3b876492c Add a test for string/from-char
This adds a test for the `string/from-char` instruction
2021-03-18 23:05:13 -05:00
Erik Rauer
196f39ccb6 Add a test for string/from-boolean
This adds a test for the `string/from-boolean` instruction
2021-03-18 23:01:09 -05:00
Erik Rauer
2008712e0a Add test for string/first
This adds a test for the `string/first` instruction
2021-03-18 22:48:15 -05:00
Erik Rauer
50804b7cb8 Add test for string/empty-string
This adds a test for the `string/empty-string` instruction
2021-03-18 22:32:11 -05:00
Erik Rauer
19b67cdfec Add test for string/drop
This adds a test for the `string/drop` instruction
2021-03-16 23:22:40 -05:00
Erik Rauer
f14d738669 Fix some issues with the string/contains-char test
Fixes the test to actually run `check-contains-char` as well as some issues with that function.

Also fixes similar problems with the `string/conj-char` test.
2021-03-16 23:22:04 -05:00
Erik Rauer
54c44a49b6 Add test for string/contains-char
This adds a test for the `string/contains-char` instruction
2021-03-16 22:54:07 -05:00
Erik Rauer
54e0901040 Change naming of some variables and fix string/conj-char
This fixes `string/conj-char` to actually run the correct instruction instead of `string/concat`.

Additionally, changes the name of some variables.
2021-03-16 22:49:49 -05:00
Erik Rauer
227a41b376 Add test for string/contains
This adds a test for the `string/contains` instruction
2021-03-16 22:43:59 -05:00
Erik Rauer
f028b7005d Add test for string/conj-char
This adds a test for the `string/conj-char` instruction
2021-03-16 22:27:20 -05:00
Erik Rauer
d73b7c6117 Add test for string/concat
This adds a test for the `string/concat` instruction
2021-03-16 22:26:35 -05:00
Erik Rauer
e21ca24d9d Add test for string/butlast
This adds a test for the `string/butlast` instruction
2021-03-16 22:26:35 -05:00
Erik Rauer
2af20b66b2 Delete core_test.clj file
This file was rather unnecessary so we decided to remove it for the time being.
2021-01-21 15:46:10 -06:00
Erik Rauer
080df4709e Add tests for vector/_iterate
Tests work by iterating the appropriate print instruction on the vector and checking that resulting string in `:output` stack is correct.
2021-01-07 15:48:28 -06:00
Erik Rauer
39626a1764 Fix vector/_replacefirst tests
This fixes the `vector/_replacefirst` tests to be consistent with the changes made to `vector/_replacefirst` in the previous commit.
2021-01-07 14:27:14 -06:00
Erik Rauer
5412ff6c90 Add tests for vector/_take
This add tests for `vector/_take`.
2021-01-05 15:52:59 -06:00
Erik Rauer
2ffffa9fd4 Add tests for vector/_set
This adds tests for `vector/_set`.
2021-01-05 15:46:38 -06:00
Erik Rauer
1c58bcca49 Fix tests for vector/_reverse 2021-01-05 15:26:11 -06:00
Erik Rauer
fce10ca97c Add tests for vector/_reverse
This adds tests for `vector/_reverse`.
2021-01-05 14:55:23 -06:00
Erik Rauer
8afa8f83e5 Add tests for vector/_rest
This adds tests for `vector/_rest`.
2021-01-05 14:49:54 -06:00
Erik Rauer
bcddca184c Add tests for vector/_replacefirst
Add tests for `vector/_replacefirst`.
2021-01-03 18:29:16 -06:00
Erik Rauer
cfe91b5ced Add tests for `vector/_replace'
This adds tests for `vector/_replace`.

We might want to change `vector/_replace` to return `:ignore-instruction` when the value to be replaced is not present in the vector. Same with `vector/_remove`.
2021-01-03 17:50:42 -06:00
Erik Rauer
94d421ef0a Add tests for vector/_remove
This adds tests for `vector/_remove`.
2021-01-03 16:17:09 -06:00
Erik Rauer
f71760c08f Add tests for vector/_pushall
This adds tests for `vector/_pushall`.
2020-12-30 14:47:29 -06:00
Erik Rauer
aa2ed597a1 Add tests for vector/_occurrencesof
This adds tests for `vector/_occurrencesof`.
2020-12-30 14:23:14 -06:00
Erik Rauer
bef5a398eb Add tests for vector/_nth
This adds tests for `vector/_nth`.
2020-12-29 16:18:45 -06:00
Erik Rauer
aae0873c81 Add tests for vector/_length
This adds tests for `vector/_length`.

Also moves the tests for `vector/_indexof` higher in the file in order to be more consistent with the ordering in `vector.cljc`.
2020-12-29 15:08:33 -06:00
Erik Rauer
89b861f124 Add tests for vector/_conj
This adds tests for `vector/_conj`.

Also moves the tests for `vector/_concat` towards the top of the file to be more consistent with the order in `vector.cljc`.
2020-12-29 14:55:58 -06:00
Erik Rauer
5e87478ceb Add tests for vector/_butlast
This adds tests for `vector/_butlast`.
2020-12-29 14:43:39 -06:00
Nic McPhee
957af4fc06 Use new gen-specs macro for other test cases
This moved the new `gen-specs` macro to the top of the file, and uses it to simplify the generation for the existing specifications. This allowed us to remove quite a lot of code.

We also had to change the order of arguments for all the "old" check functions so that `value-type` comes first. We renamed a few check functions so the naming is more consistent.
2020-12-28 15:45:45 -06:00
Nic McPhee
d30f7c195e Write generalized spec generation macro
This add `gen-spec` which provides a fairly general macro for creating `test.check` specifications for vector instructions.  It takes a string used to generate specification names, a function used to check the state after running the function under test, and a list of keywords indicating types for arguments generated by `test.check` and passed to the check function.

Keywords like `:integer` and `:string` are associated with "simple" generators such as `gen/small-integer` and `gen/string`. The keyword `:vector` is used to generate a vector of items whose type is specified by the `generator` argument to `generator-for-arg-type`. This allows us to loop over all of the supported vector item types in the macro and generate a separate specification for each type.

We moved the `value-type` argument for the `check` functions to the front to simplify passing in the value type arguments, which can vary in number.
2020-12-28 15:27:10 -06:00