mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Update to use new square brace formatting
This commit is contained in:
parent
0fae5b0bac
commit
4eec34becf
120 changed files with 1149 additions and 1155 deletions
|
@ -705,7 +705,7 @@ pub fn listWalkUntil(
|
|||
dec: Dec,
|
||||
output: Opaque,
|
||||
) callconv(.C) void {
|
||||
// [ Continue a, Stop a ]
|
||||
// [Continue a, Stop a]
|
||||
|
||||
if (accum_width == 0) {
|
||||
return;
|
||||
|
@ -734,7 +734,7 @@ pub fn listWalkUntil(
|
|||
|
||||
caller(data, bytes_ptr, element, bytes_ptr);
|
||||
|
||||
// [ Continue ..., Stop ]
|
||||
// [Continue ..., Stop]
|
||||
const tag_id = has_tag_id(0, bytes_ptr);
|
||||
|
||||
if (!tag_id.matched) {
|
||||
|
|
|
@ -547,7 +547,7 @@ fn strSplitInPlace(array: [*]RocStr, string: RocStr, delimiter: RocStr) void {
|
|||
}
|
||||
|
||||
test "strSplitInPlace: empty delimiter" {
|
||||
// Str.split "abc" "" == [ "abc" ]
|
||||
// Str.split "abc" "" == ["abc"]
|
||||
const str_arr = "abc";
|
||||
const str = RocStr.init(str_arr, str_arr.len);
|
||||
|
||||
|
@ -581,7 +581,7 @@ test "strSplitInPlace: empty delimiter" {
|
|||
}
|
||||
|
||||
test "strSplitInPlace: no delimiter" {
|
||||
// Str.split "abc" "!" == [ "abc" ]
|
||||
// Str.split "abc" "!" == ["abc"]
|
||||
const str_arr = "abc";
|
||||
const str = RocStr.init(str_arr, str_arr.len);
|
||||
|
||||
|
@ -700,7 +700,7 @@ test "strSplitInPlace: delimiter on sides" {
|
|||
}
|
||||
|
||||
test "strSplitInPlace: three pieces" {
|
||||
// Str.split "a!b!c" "!" == [ "a", "b", "c" ]
|
||||
// Str.split "a!b!c" "!" == ["a", "b", "c"]
|
||||
const str_arr = "a!b!c";
|
||||
const str = RocStr.init(str_arr, str_arr.len);
|
||||
|
||||
|
@ -786,7 +786,7 @@ pub fn countSegments(string: RocStr, delimiter: RocStr) callconv(.C) usize {
|
|||
}
|
||||
|
||||
test "countSegments: long delimiter" {
|
||||
// Str.split "str" "delimiter" == [ "str" ]
|
||||
// Str.split "str" "delimiter" == ["str"]
|
||||
// 1 segment
|
||||
const str_arr = "str";
|
||||
const str = RocStr.init(str_arr, str_arr.len);
|
||||
|
@ -804,7 +804,7 @@ test "countSegments: long delimiter" {
|
|||
}
|
||||
|
||||
test "countSegments: delimiter at start" {
|
||||
// Str.split "hello there" "hello" == [ "", " there" ]
|
||||
// Str.split "hello there" "hello" == ["", " there"]
|
||||
// 2 segments
|
||||
const str_arr = "hello there";
|
||||
const str = RocStr.init(str_arr, str_arr.len);
|
||||
|
@ -823,7 +823,7 @@ test "countSegments: delimiter at start" {
|
|||
}
|
||||
|
||||
test "countSegments: delimiter interspered" {
|
||||
// Str.split "a!b!c" "!" == [ "a", "b", "c" ]
|
||||
// Str.split "a!b!c" "!" == ["a", "b", "c"]
|
||||
// 3 segments
|
||||
const str_arr = "a!b!c";
|
||||
const str = RocStr.init(str_arr, str_arr.len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue