417 Commits

Author SHA1 Message Date
Erik Rauer
7aad934b96 Change string/last
Changes `string/last` to return `:ignore-instruction` if the given string is empty
2021-03-23 22:42:49 -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
9cd4f875c2 Fix string/indexof-char
Changes `string/indexof-char` to return :ignore-instruction if the character is not present in the string. This makes it consistent with it's description
2021-03-21 01:02:11 -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
39a25fa7e3 Change the string/first instruction
This changes the `string/first` instruction to return :ignore-instruction if the string is empty.
2021-03-18 22:49:44 -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
278fe26aab Merge branch 'master' into test-string-instructions
Accidentally pushed the string instruction tests to master instead of this branch.
2021-03-18 14:58:53 -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
ca311c9f36 Fix string/contains
This fixes `string/contains` to be consistent with it's descriptions, as well as it's implementation in Clojush
2021-03-16 22:47:41 -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
156bbb91e3 Make limiting work in ClojureScript
Change `keep-number-reasonable` so that it doesn't use Java's Double class when running in ClojureScript.

I believe this should work, but I haven't tested it with ClojureScript yet.
2021-03-04 16:02:31 -06:00
Lee Spector
d07bb0a75a Specify opens for all exec instructions 2021-01-29 19:32:28 -05:00
Erik Rauer
7f5168769d Add methods to prevent numbers, vectors and strings from getting too big
This should prevent numbers from getting too big or small, as well as prevent strings and vectors from getting too long.

All the code was written by @mcgirjau and can be found here:
b75e000a38
2021-01-28 16:25:00 -06:00
Nic McPhee
a985b6a9b5 Merge branch 'master' into test-vector-instructions 2021-01-23 17:42:49 -06:00
Nic McPhee
5c4d033c4f Merge remote-tracking branch 'upstream/master' 2021-01-23 17:41:39 -06:00
Lee Spector
b64d40e1b0 Resolve merge conflicts 2021-01-23 16:46:40 -05:00
Lee Spector
864c8fb8ee Print behavioral diversity and avg total error; add tail-aligned crossover and diploid operators; fix valiant problem 2021-01-23 16:14:09 -05:00
Lee Spector
5891c8641d
Merge pull request #10 from NicMcPhee/test-vector-instructions
Add tests for vector instructions
2021-01-23 15:49:42 -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
9694143c4e Add .clj-kondo/ to the gitignore 2021-01-21 15:27:07 -06:00
Erik Rauer
6e281b7430 Add .clj-kondo/ to the gitignore 2021-01-21 15:26:00 -06:00
Erik Rauer
68802a9e45 Merge branch 'master' into test-vector-instructions 2021-01-21 15:19:11 -06:00
Erik Rauer
81af9c8f15 Merge remote-tracking branch 'lspector/master' 2021-01-21 15:16:41 -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
beed85b5c0 Change vector/_replacefirst
This changes `vector/_replacefirst` to just return the original vector if the value that will be replaced was not found. This change was made in order to be more consistent with Clojush.
2021-01-07 14:23:41 -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
7613f18c70 Fix vector/_set
This makes it so that `vector/_set` returns `:ignore-instruction` if the given vector is empty.
2021-01-05 15:47:37 -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
d5f115f81c Fix vector/_replacefirst
This changes the function to throw `:ignore-instruction` if the replacement value is not present in the vector.
2021-01-03 18:31:12 -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