Folkert
a22e04361c
Merge remote-tracking branch 'origin/main' into expect-fx-codegen
2022-08-23 16:28:21 +02:00
Anton-4
9a715a0d4b
improve comments zig tests, set up zig tests in CI
2022-08-19 17:14:49 +02:00
Folkert
3aa4ebb02f
get expect-fx to actually run
2022-08-12 23:03:01 +02:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos
2022-08-12 15:24:09 -04:00
Anton-4
720f02372c
use most compatible bash shebang
2022-08-12 11:45:02 +02:00
Brendan Hansknecht
ca8b052094
switch to wrapping subtract since it is safe here
2022-08-01 22:32:43 -07:00
Brendan Hansknecht
afaf59a050
change refcounts to assume overflows are impossible
2022-08-01 22:32:43 -07:00
Folkert
1bfac155ca
implement expect struct reporting
2022-07-28 16:47:02 +02:00
Folkert de Vries
66365fba6e
Merge pull request #3649 from rtfeldman/3640-str-split-edge-case
...
Fix `Str.split` edge case when string and delimiter are equal
2022-07-28 11:30:40 +02:00
raleng
c7997c7c38
Fix formatting
2022-07-28 01:57:01 +02:00
raleng
17fc1a297c
Fix Str.split when string equals delimiter
...
countSegments and strSplitHelp check whether the length of the string is
strictly greater-than the length of the delimiter, skipping most of the
logic when this is not the case.
Changing the check to a greater-than-or-equal allows for the case when
the string and the delimiter are equal, giving the expected result of
["", ""].
2022-07-28 01:36:02 +02:00
raleng
71e83746cc
add countSegments test case
...
The test ensures countSegments returns a count of two when the string
and the delimiter are equal. The expected result of Str.split in that
case is ["", ""].
2022-07-28 01:35:08 +02:00
raleng
261ff3224d
Add strSplitHelp test cases
...
Add a test for the case when the string starts with the delimiter, and
when the string and the delimiter are equal.
2022-07-28 01:34:20 +02:00
Folkert
8e5b0daa94
figured out how to serialize nested structures
2022-07-27 23:52:11 +02:00
Folkert
e62a0ee39a
make string clone return where next extra bytes should be written
2022-07-27 22:48:41 +02:00
Folkert
f7452b8889
pass the shared buffer to zig directly
2022-07-27 17:16:12 +02:00
Folkert
498004c554
clean up expect code when not running tests
2022-07-27 12:26:03 +02:00
Folkert
40d7e94a17
make the mmapped buffer configurable
2022-07-26 23:36:25 +02:00
Folkert
6d0e751999
fix bug in expect handling on the cli side
2022-07-25 22:37:36 +02:00
Folkert
012c6a75d1
simplify RocStr to array in zig
2022-07-24 11:50:28 +02:00
Folkert
ab3a431db7
add string cloning helper
2022-07-23 00:08:01 +02:00
Richard Feldman
7e446d1b0d
Eliminate @memcpy from Str.trim functions
2022-07-18 10:28:53 -04:00
Folkert
b9ebd4fa27
Merge remote-tracking branch 'origin/trunk' into pretty-expect-output
2022-07-15 09:12:04 +02:00
Folkert de Vries
1b1b63aad0
Merge branch 'trunk' into assoc-list-dict
2022-07-14 16:47:50 +02:00
Richard Feldman
da7c7ac5f2
Merge pull request #3525 from rtfeldman/3522
...
Num.toStr for f32, f64, Dec
2022-07-13 21:30:05 -04:00
Folkert
06938429a1
Merge branch 'assoc-list-dict' into pretty-expect-output
2022-07-14 00:39:01 +02:00
Ayaz Hafiz
b50974e4ee
Update zig tests
2022-07-13 17:20:47 -04:00
Richard Feldman
77afe0c1f1
Merge pull request #3503 from rtfeldman/string-memory-problems
...
String memory problems
2022-07-13 15:17:28 -04:00
Folkert
5763248b44
Merge remote-tracking branch 'origin/trunk' into assoc-list-dict
2022-07-13 20:44:28 +02:00
Ayaz Hafiz
980c3f1421
Use decimal formatting for float Num.toStr
2022-07-13 12:35:49 -04:00
Richard Feldman
25facfa9c6
Expose capacity builtins
2022-07-13 12:19:37 -04:00
Ayaz Hafiz
66b8d145a9
Support Num.toStr for dec
2022-07-13 12:13:21 -04:00
Ayaz Hafiz
b7c312d449
Support Num.toStr for f32, f64
2022-07-13 12:13:01 -04:00
Folkert
d33beedcd0
add the zig bits for expects
2022-07-13 14:40:07 +02:00
Folkert
6c26d8812f
remove dict/hash stuff from the zig builtins
2022-07-13 11:59:46 +02:00
Folkert
9a51737a47
fix use after free
2022-07-13 10:34:30 +02:00
Folkert
bc24841921
Str.fromUtf8Range: take list argument as owned; make sure it's decremented in the small string case
2022-07-12 22:57:48 +02:00
Folkert
e8530eaca5
improve lowlevel unwrapping
2022-07-08 22:13:13 +02:00
Folkert
972d652d5d
Merge remote-tracking branch 'origin/trunk' into list-unsafe-append
2022-07-08 13:57:09 +02:00
Ayaz
856b38a958
Merge pull request #3319 from rtfeldman/remove-old-expect-logic
...
remove old expect logic
2022-07-07 21:21:36 -05:00
Folkert
56c9787e8f
List.appendUnsafe and List.reserve
2022-07-07 22:40:28 +02:00
Folkert
c5ac4a2984
fix reallocation setting both length and capacity
2022-07-06 23:56:04 +02:00
Folkert
36b42fb62b
use existing capacity in Str.concat if possible
2022-07-06 17:59:48 +02:00
Folkert
f05274faef
Merge remote-tracking branch 'origin/trunk' into remove-old-expect-logic
2022-07-06 13:03:41 +02:00
Folkert
52605fcca9
simplify string splitting LLVM codegen
2022-07-06 01:12:03 +02:00
Folkert de Vries
93dbda9ac5
Merge pull request #3399 from rtfeldman/pure-roc-map-with-index
...
Pure Roc `List.mapWithIndex`
2022-07-06 00:25:46 +02:00
Folkert
6d7c329698
Str.walkScalars
2022-07-04 18:01:19 +02:00
Folkert
1de9270ecf
Merge remote-tracking branch 'origin/trunk' into str-walk
2022-07-04 16:30:07 +02:00
Folkert
9c41a4d442
str.appendScalar
2022-07-04 16:27:04 +02:00
Brian Carroll
40231535fa
builtins: Delete Zig implementation of List.mapWithIndex
2022-07-04 15:14:32 +01:00