Commit Graph

121 Commits

Author SHA1 Message Date
Chris Hall
bc41cfa140 Moving String.join to also use StringBuilder, adding String.join-with-char
Issue #94
2018-05-20 17:11:26 +10:00
Chris Hall
1453649740 Adding another test for String.allocate checking length
Issue #94
2018-05-20 15:26:21 +10:00
Chris Hall
0895b08b39 Adding test against empty string for String.allocate
Issue #94
2018-05-20 15:22:13 +10:00
Chris Hall
d3c3645719 Adding test for String.allocate
Issue #94
2018-05-20 15:18:36 +10:00
Chris Hall
b46b2a39e8 String.append is now by reference, StringCopy.append is by copy/linear
Adding memory leak tests to String.append and StringCopy.append

Issue #94
2018-05-20 14:16:10 +10:00
Chris Hall
4fce1e6aa0 Adding test for String.string-set-at!
Issue #94
2018-05-20 13:53:45 +10:00
Chris Hall
05e1c18d3e Improving test for String.string-set!
Issue #94
2018-05-20 13:37:35 +10:00
Chris Hall
74dd861263 Adding test for String.string-set!
Issue #94
2018-05-20 13:29:09 +10:00
Chris Hall
531a7eec1a Adding tests for String str on Bool
Issue #94
2018-05-20 12:49:58 +10:00
Chris Hall
562dfb4062 Adding test for String /=
Issue #94
2018-05-20 12:48:50 +10:00
Chris Hall
a373dd6944 Adding test on String =
Issue #94
2018-05-20 12:48:50 +10:00
Chris Hall
4d0d1db0b6 Adding test checking empty? against zero
Issue #94
2018-05-20 12:48:50 +10:00
Chris Hall
a0e507774d Adding test for String.repeat
Issue #94
2018-05-20 12:48:50 +10:00
Chris Hall
4bc3f778f0 Adding test for String.append
Issue #94
2018-05-20 12:48:50 +10:00
Chris Hall
9126f24db8 Renaming String.join -> String.concat, and String.join-with to String.join
This naming matches s-el and other languages/libraries.

Issue #94
2018-05-20 12:48:50 +10:00
Chris Hall
35c8dd9bfa Adding tests for String.join and String.join-with
Issue #94
2018-05-20 12:48:50 +10:00
hellerve
e3c1a31ec6 core: add neg protocol and add to int and long 2018-05-07 21:57:15 +02:00
hellerve
414451f2fa tests: add test script recording 2018-04-10 12:34:36 +02:00
hellerve
b9ae704dcc all: change system argument api 2018-04-04 09:00:20 +02:00
hellerve
4d70811479 all: add System.args 2018-04-03 17:51:37 +02:00
Chris Hall
f067eb4716 Fixing breaking unit test bug #212 2018-03-31 11:41:15 +11:00
Erik Svedäng
1239d38f03 More short circuiting tests. 2018-03-15 20:10:00 +01:00
Erik Svedäng
9e6444ceb5 The test that will pass when this works. 2018-03-15 16:11:07 +01:00
hellerve
ef5d50cad8 core: add Pattern.from-chars, simplify String.split-by 2018-03-13 17:06:14 +01:00
hellerve
da91127563 core: add useful string functions 2018-03-13 12:13:29 +01:00
Erik Svedäng
a9fd73ab2a Load 'Debug.carp' by default. 2018-03-13 09:43:08 +01:00
Erik Svedäng
605a724765 Fixed memory leak in 'from-chars'. 2018-03-12 14:56:05 +01:00
Erik Svedäng
b5ab5cebca Fixed leaks in Array.reverse and Array.swap. 2018-03-12 14:37:53 +01:00
Erik Svedäng
f4d84c80fc Memory tests for all Array functions (some errors found but not solved). 2018-03-12 13:48:31 +01:00
Erik Svedäng
f3b55e7937 Optimized Array.aupdate from 5.93691s to 2.75493s for array of 1000000 ints. 2018-03-11 13:56:07 +01:00
Erik Svedäng
ff6852d839 Changed signature of Array.swap. Optimized from 2.66486s -> 1.32265s for 1000000 Int elements. 2018-03-11 10:38:24 +01:00
Erik Svedäng
4c8b661bdc Moved safe int functions into their own file that's not automatically loaded. 2018-03-06 16:44:07 +01:00
hellerve
dac3bad33a core: regex helper functions are done 2018-03-03 19:19:59 +01:00
hellerve
5c736fd224 core: rename regex to pattern, as @RyanSquared suggested in #192 2018-03-02 15:31:26 +01:00
hellerve
345f5d3c8a all: add autoescaping in regexes 2018-03-01 19:41:20 +01:00
hellerve
bdbb2d7c5b regex: add regex module and type 2018-03-01 19:19:20 +01:00
hellerve
0494dda3ff core: bugfixes to regex; return -1 on simple find error, return correct index on find, and correct string on match-str 2018-03-01 18:04:33 +01:00
hellerve
3deb6f0658 core: add match-str and matches? to regex 2018-02-28 11:19:13 +01:00
hellerve
93171ccbaa core: regex api seems to work completely 2018-02-28 11:18:57 +01:00
Erik Svedäng
e80af19a39 Added prn for Strings, make 'str' not print with @ and quotes. 2018-02-06 18:37:15 +01:00
Erik Svedäng
a25606725e Proper 'assert' macro that reports source location. 2018-02-06 10:12:43 +01:00
Erik Svedäng
d23a211985 BUG FIX: Must handle deletion of temporary values used during initialization of global variables. 2018-02-06 08:21:50 +01:00
Erik Svedäng
e8ac5c86c6 BUG FIX: Setting global variables doesn't leak. 2018-02-05 19:01:00 +01:00
Erik Svedäng
058b474f1e IMPORTANT BUG FIX: Values created (but not returned) in conditional branches are properly deleted. 2018-02-05 17:25:03 +01:00
Erik Svedäng
b51c642436 Disable test 4 for now. 2018-02-05 11:09:36 +01:00
Erik Svedäng
8f256c5aef Bugfixing. 2018-02-05 10:49:35 +01:00
Erik Svedäng
4cad6021f6 Some more memory tests. 2018-02-05 08:17:09 +01:00
Erik Svedäng
eb05140314 Merge branch 'overhaul-set-bang' 2018-02-05 07:57:55 +01:00
Erik Svedäng
545a367933 Run 'setting-4'. 2018-02-02 12:30:27 +01:00
Erik Svedäng
b10bb35591 Two failing tests for if-statements. 2018-02-02 12:07:13 +01:00