From e617149c94ca6af68ed5cf2f8f08566c69bd7c04 Mon Sep 17 00:00:00 2001 From: Jason_000 Date: Sat, 7 Dec 2024 20:34:05 +0000 Subject: [PATCH 1/5] Fix sorting and use utf8 cmp for strings --- src/vm/datatypes/lists/lists.c | 105 ++++++--------------------------- src/vm/datatypes/lists/lists.h | 1 + 2 files changed, 18 insertions(+), 88 deletions(-) diff --git a/src/vm/datatypes/lists/lists.c b/src/vm/datatypes/lists/lists.c index 7389e3904..20ada0cf3 100644 --- a/src/vm/datatypes/lists/lists.c +++ b/src/vm/datatypes/lists/lists.c @@ -309,91 +309,6 @@ static Value copyListDeep(DictuVM *vm, int argCount, Value *args) { return OBJ_VAL(list); } - -int compareString(ObjString *operandOne, ObjString *operandTwo) { - return strcmp(operandOne->chars, operandTwo->chars); -} - -static int partitionStringList(ObjList *arr, int start, int end) { - int pivot_index = (int) floor(start + end) / 2; - - ObjString *pivot = AS_STRING(arr->values.values[pivot_index]); - - int i = start - 1; - int j = end + 1; - - for (;;) { - do { - i = i + 1; - } while (compareString(AS_STRING(arr->values.values[i]), pivot) < 0); - - do { - j = j - 1; - } while (compareString(AS_STRING(arr->values.values[j]), pivot) > 0); - - if (i >= j) { - return j; - } - - // Swap arr[i] with arr[j] - Value temp = arr->values.values[i]; - - arr->values.values[i] = arr->values.values[j]; - arr->values.values[j] = temp; - } -} - - -static int partitionNumberList(ObjList *arr, int start, int end) { - int pivot_index = (int) floor(start + end) / 2; - - double pivot = AS_NUMBER(arr->values.values[pivot_index]); - - int i = start - 1; - int j = end + 1; - - for (;;) { - do { - i = i + 1; - } while (AS_NUMBER(arr->values.values[i]) < pivot); - - do { - j = j - 1; - } while (AS_NUMBER(arr->values.values[j]) > pivot); - - if (i >= j) { - return j; - } - - // Swap arr[i] with arr[j] - Value temp = arr->values.values[i]; - - arr->values.values[i] = arr->values.values[j]; - arr->values.values[j] = temp; - } -} - -// Implementation of Quick Sort using the Hoare -// Partition scheme. -// Best Case O(n log n) -// Worst Case O(n^2) (If the list is already sorted.) -static void quickSort(ObjList *arr, int start, int end, int (*partition)(ObjList *, int, int)) { - while (start < end) { - int part = partition(arr, start, end); - - // Recurse for the smaller halve. - if (part - start < end - part) { - quickSort(arr, start, part, partition); - - start = start + 1; - } else { - quickSort(arr, part + 1, end, partition); - - end = end - 1; - } - } -} - bool isNumberList(ObjList *list) { for (int i = 0; i < list->values.count; i++) { if (!IS_NUMBER(list->values.values[i])) { @@ -412,6 +327,20 @@ bool isStringList(ObjList *list) { return true; } +int compareNumbers(const void* a, const void* b) { + Value aVal = *(Value *)a; + Value bVal = *(Value *)b; + + return AS_NUMBER(aVal) - AS_NUMBER(bVal); +} + +int compareString(const void* a, const void* b) { + Value aVal = *(Value *)a; + Value bVal = *(Value *)b; + + return utf8cmp(AS_CSTRING(aVal), AS_CSTRING(bVal)); +} + static Value sortList(DictuVM *vm, int argCount, Value *args) { if (argCount != 0) { runtimeError(vm, "sort() takes no arguments (%d given)", argCount); @@ -421,17 +350,17 @@ static Value sortList(DictuVM *vm, int argCount, Value *args) { ObjList *list = AS_LIST(args[0]); if (isNumberList(list)) { - quickSort(list, 0, list->values.count - 1, &partitionNumberList); + qsort(list->values.values, list->values.count, sizeof(*list->values.values), compareNumbers); return NIL_VAL; } if (isStringList(list)) { - quickSort(list, 0, list->values.count - 1, &partitionStringList); + qsort(list->values.values, list->values.count, sizeof(*list->values.values), compareString); return NIL_VAL; } runtimeError(vm, - "sort() takes lists with either numbers or string (other types and heterotypic lists are not supported)"); + "sort() takes lists with either numbers or string (other types and heterogeneous lists are not supported)"); return EMPTY_VAL; } diff --git a/src/vm/datatypes/lists/lists.h b/src/vm/datatypes/lists/lists.h index d290c49c3..58ece50bc 100644 --- a/src/vm/datatypes/lists/lists.h +++ b/src/vm/datatypes/lists/lists.h @@ -7,6 +7,7 @@ #include "../copy.h" #include "../../util.h" +#include "../../utf8.h" void declareListMethods(DictuVM *vm); From 133acf839f6f4a6c3a4d0d59441c0b73828a16b1 Mon Sep 17 00:00:00 2001 From: Jason_000 Date: Sat, 7 Dec 2024 20:46:34 +0000 Subject: [PATCH 2/5] Add tests for list compare --- tests/lists/sort.du | 40 ++ tests/lists/sorted.txt | 1000 ++++++++++++++++++++++++++++++++++++++ tests/lists/unsorted.txt | 1000 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 2040 insertions(+) create mode 100644 tests/lists/sorted.txt create mode 100644 tests/lists/unsorted.txt diff --git a/tests/lists/sort.du b/tests/lists/sort.du index df0a33a20..0ab5a3cf5 100644 --- a/tests/lists/sort.du +++ b/tests/lists/sort.du @@ -67,6 +67,46 @@ class TestListSort < UnitTest { z.sort(); this.assertEquals(z, ["abc", "abc", "cde", "cde"]); } + + testStringLargeSort() { + var contents; + with("tests/lists/unsorted.txt", "r") { + contents = file.read(); + } + + const listContents = contents.split("\n"); + listContents.sort(); + + with("tests/lists/sorted.txt", "r") { + var line; + var index = 0; + // When you reach the end of the file, nil is returned + while((line = file.readLine()) != nil) { + this.assertEquals(listContents[index], line); + index += 1; + } + } + } + + testNumberLargeSort() { + var contents; + with("tests/lists/unsorted.txt", "r") { + contents = file.read(); + } + + const listContents = contents.split("\n"); + listContents.sort(); + + with("tests/lists/sorted.txt", "r") { + var line; + var index = 0; + // When you reach the end of the file, nil is returned + while((line = file.readLine()) != nil) { + this.assertEquals(listContents[index].toNumber().unwrap(), line.toNumber().unwrap()); + index += 1; + } + } + } } TestListSort().run(); \ No newline at end of file diff --git a/tests/lists/sorted.txt b/tests/lists/sorted.txt new file mode 100644 index 000000000..7273fcbc9 --- /dev/null +++ b/tests/lists/sorted.txt @@ -0,0 +1,1000 @@ +10074 +10096 +10194 +10279 +10306 +10452 +10510 +10511 +10565 +10727 +10750 +10758 +10831 +10848 +10933 +10946 +11005 +11066 +11240 +11287 +11417 +11458 +11629 +11640 +11874 +12038 +12219 +12278 +12339 +12506 +12524 +12603 +12705 +12865 +12913 +12936 +12950 +13092 +13172 +13244 +13334 +13587 +13654 +13669 +13711 +13825 +13866 +13890 +13932 +14080 +14114 +14191 +14318 +14327 +14336 +14460 +14496 +14581 +14626 +14714 +14733 +14868 +14881 +15256 +15257 +15407 +15429 +15500 +15504 +15920 +16043 +16121 +16245 +16278 +16336 +16417 +16465 +16865 +16906 +17160 +17178 +17541 +17589 +17591 +17843 +17904 +17913 +18060 +18166 +18313 +18375 +18389 +18508 +18636 +18793 +18940 +19013 +19102 +19119 +19260 +19738 +19772 +19824 +19922 +19928 +20019 +20037 +20043 +20065 +20120 +20439 +20507 +20582 +20682 +20700 +20793 +20912 +20926 +20938 +21014 +21067 +21262 +21394 +21431 +21558 +21586 +21591 +21631 +21709 +21807 +21922 +21981 +22061 +22067 +22137 +22214 +22262 +22393 +22408 +22496 +22679 +22706 +22721 +22795 +22824 +22861 +22883 +23278 +23547 +23554 +23563 +23669 +23704 +23721 +23738 +23899 +23990 +24024 +24039 +24177 +24191 +24262 +24268 +24478 +24490 +24524 +24618 +24668 +24710 +24759 +25025 +25043 +25087 +25224 +25463 +25479 +25503 +25513 +25514 +25556 +25602 +25700 +25769 +25986 +26002 +26079 +26144 +26272 +26417 +26649 +26663 +26774 +27007 +27008 +27054 +27059 +27408 +27533 +27583 +27756 +27809 +27873 +27955 +28132 +28147 +28210 +28519 +28566 +28648 +28734 +28787 +28790 +28844 +29237 +29379 +29407 +29518 +29521 +29642 +29645 +29707 +29783 +29791 +29862 +29874 +30016 +30102 +30111 +30167 +30171 +30172 +30190 +30205 +30245 +30423 +30643 +30733 +30962 +31083 +31145 +31290 +31323 +31553 +31925 +32009 +32047 +32696 +32922 +32941 +32991 +32995 +33280 +33387 +33444 +33458 +33664 +33685 +33824 +33930 +33935 +34062 +34067 +34096 +34197 +34215 +34217 +34246 +34297 +34580 +34623 +34696 +34965 +35212 +35301 +35357 +35706 +35868 +35875 +35905 +35982 +36103 +36155 +36350 +36468 +36533 +36637 +36679 +36749 +36845 +36867 +36898 +36906 +36942 +37042 +37137 +37188 +37224 +37245 +37423 +37538 +37576 +37738 +37739 +37875 +38198 +38423 +38428 +38591 +38602 +38692 +38704 +38969 +38988 +39236 +39368 +39369 +39414 +39416 +39448 +39624 +39632 +39658 +39676 +39725 +39943 +40061 +40142 +40364 +40381 +40584 +40603 +40819 +40876 +40897 +41020 +41094 +41145 +41250 +41425 +41443 +41580 +41621 +41668 +41744 +41748 +41790 +41957 +42058 +42100 +42121 +42217 +42293 +42508 +42787 +42859 +42947 +42984 +43096 +43136 +43227 +43242 +43317 +43371 +43551 +43597 +43612 +43651 +43673 +43690 +43840 +43850 +43964 +44026 +44407 +44614 +44701 +44800 +44869 +44957 +45047 +45118 +45185 +45217 +45279 +45369 +45441 +45645 +45766 +45836 +46331 +46368 +46544 +46623 +46656 +46682 +46684 +46785 +46927 +47086 +47130 +47142 +47176 +47249 +47311 +47423 +47605 +47614 +47748 +47816 +48169 +48217 +48497 +48500 +48643 +48735 +48812 +48850 +48953 +48964 +49024 +49087 +49198 +49216 +49667 +49725 +49816 +49859 +49906 +49960 +49990 +50079 +50114 +50201 +50248 +50392 +50438 +50528 +50572 +50579 +50696 +50741 +50994 +51027 +51194 +51288 +51308 +51343 +51423 +51588 +51708 +51828 +52072 +52142 +52205 +52213 +52315 +52543 +52570 +52580 +52584 +52776 +52839 +52846 +52862 +52877 +53032 +53055 +53101 +53133 +53177 +53205 +53273 +53326 +53337 +53368 +53408 +53419 +53429 +53474 +53759 +53778 +53878 +54049 +54125 +54170 +54325 +54427 +54437 +54522 +54561 +54571 +54578 +54590 +54669 +54707 +54776 +54880 +54936 +55177 +55226 +55261 +55270 +55493 +55555 +55725 +55866 +56055 +56115 +56171 +56283 +56313 +56494 +56609 +56707 +56778 +56955 +56981 +57049 +57104 +57111 +57297 +57301 +57390 +57471 +57484 +57601 +57712 +57772 +57804 +57965 +57987 +58006 +58101 +58221 +58265 +58398 +58462 +58540 +58602 +58789 +58918 +59245 +59352 +59366 +59543 +59623 +59750 +59876 +59932 +59993 +60138 +60325 +60331 +60699 +60883 +61221 +61270 +61387 +61390 +61525 +61577 +61632 +61664 +61701 +61752 +61813 +61842 +61971 +61983 +62116 +62212 +62280 +62546 +62569 +62633 +62727 +62823 +62939 +62975 +62989 +63007 +63037 +63040 +63056 +63078 +63166 +63451 +63709 +63910 +63939 +63975 +64045 +64069 +64093 +64112 +64122 +64271 +64320 +64440 +64549 +64701 +64745 +64839 +64882 +65148 +65193 +65399 +65408 +65442 +65597 +65603 +65676 +65680 +65829 +66064 +66111 +66255 +66364 +66503 +66623 +66657 +66705 +66932 +67116 +67173 +67201 +67216 +67302 +67506 +67559 +67752 +67914 +68165 +68347 +68372 +68485 +68569 +68652 +68659 +68666 +68710 +68719 +68803 +68970 +68993 +69062 +69096 +69289 +69344 +69385 +69441 +69500 +69602 +69653 +69672 +69702 +69717 +69835 +69851 +69892 +69928 +70151 +70255 +70472 +70645 +70670 +70702 +70776 +70801 +70914 +71406 +71429 +71743 +71787 +71866 +71904 +71994 +72106 +72468 +72511 +72524 +72588 +72652 +72660 +72958 +73148 +73457 +73603 +73654 +73701 +73750 +73814 +73904 +73908 +74178 +74185 +74334 +74351 +74407 +74722 +74780 +74785 +74845 +74924 +75095 +75221 +75274 +75308 +75507 +75669 +75783 +75809 +75883 +75936 +75981 +76079 +76095 +76283 +76364 +76384 +76519 +76537 +76689 +76862 +77021 +77045 +77083 +77437 +77544 +77827 +77834 +77839 +77897 +78049 +78166 +78168 +78178 +78226 +78329 +78342 +78344 +78514 +78548 +78586 +78816 +78866 +79049 +79108 +79184 +79218 +79474 +79804 +79820 +79946 +79954 +79982 +80177 +80234 +80368 +80641 +80667 +81026 +81101 +81174 +81231 +81233 +81314 +81359 +81444 +81470 +81490 +81563 +81565 +81713 +81752 +81798 +81905 +82025 +82148 +82170 +82222 +82307 +82457 +82581 +82793 +82812 +82834 +82911 +82947 +82973 +82977 +83055 +83090 +83091 +83116 +83458 +83622 +83660 +83688 +83841 +83942 +83983 +84192 +84212 +84274 +84302 +84393 +84394 +84407 +84426 +84578 +84608 +84649 +84652 +84746 +84984 +85025 +85065 +85169 +85229 +85498 +85633 +85880 +85889 +85904 +85934 +86165 +86168 +86247 +86295 +86432 +86557 +86576 +86634 +86698 +86709 +86784 +86820 +86864 +87063 +87125 +87154 +87208 +87252 +87273 +87304 +87334 +87493 +87574 +87590 +87632 +87647 +87708 +87806 +87831 +87872 +87992 +88017 +88110 +88373 +88416 +88542 +88561 +88760 +88761 +88797 +88825 +88883 +89143 +89611 +89661 +89706 +89799 +89894 +90022 +90163 +90335 +90434 +90593 +90631 +90711 +90779 +90819 +90893 +90938 +90967 +90974 +91035 +91048 +91128 +91132 +91274 +91548 +91564 +91590 +91673 +91760 +91972 +91974 +92004 +92005 +92065 +92088 +92115 +92170 +92199 +92383 +92384 +92488 +92492 +92496 +92502 +92712 +92837 +93089 +93198 +93531 +93577 +93730 +93794 +93818 +94022 +94093 +94161 +94380 +94584 +94624 +94730 +94767 +94775 +94850 +94862 +94866 +94898 +95001 +95020 +95228 +95373 +95395 +95431 +95446 +95453 +95491 +95654 +95669 +95830 +95920 +95947 +95949 +96010 +96056 +96117 +96175 +96415 +96483 +96561 +96623 +96758 +96803 +96907 +96942 +96953 +97222 +97267 +97322 +97416 +97541 +97652 +97736 +97762 +97779 +97913 +98034 +98258 +98277 +98309 +98346 +98428 +98451 +98465 +98537 +98613 +98654 +98833 +98843 +98906 +98946 +98954 +99156 +99160 +99200 +99256 +99269 +99317 +99368 +99631 +99728 +99820 +99851 +99876 \ No newline at end of file diff --git a/tests/lists/unsorted.txt b/tests/lists/unsorted.txt new file mode 100644 index 000000000..dd6bfc36f --- /dev/null +++ b/tests/lists/unsorted.txt @@ -0,0 +1,1000 @@ +58789 +27059 +86784 +72958 +95228 +77437 +33685 +99368 +41094 +70702 +67914 +60325 +25043 +59623 +57390 +68803 +24268 +65399 +97762 +50114 +88373 +49024 +96953 +43964 +84426 +76079 +22861 +91048 +74780 +49960 +91972 +52862 +62546 +92384 +80234 +98465 +34696 +84984 +32047 +20926 +79049 +61387 +40584 +92492 +37042 +24478 +10848 +96010 +21014 +89706 +51308 +87493 +20912 +27054 +57804 +47423 +68652 +86295 +49216 +25463 +20700 +48643 +73701 +81231 +43227 +22496 +98833 +54707 +24668 +69702 +82025 +40061 +16121 +64440 +79108 +51027 +68719 +23563 +83622 +57297 +61983 +12603 +23669 +52072 +78049 +23990 +22137 +90938 +55725 +59993 +54578 +92115 +38969 +81101 +93794 +64839 +47311 +78166 +87125 +66623 +88110 +72660 +41748 +91564 +12219 +60138 +54590 +62975 +61842 +26272 +27007 +48169 +94898 +22706 +56283 +29521 +36845 +88825 +29862 +81174 +13711 +53878 +87590 +99631 +82834 +78342 +28790 +36906 +14336 +76519 +87574 +63709 +39632 +29645 +81798 +81713 +22679 +38591 +14714 +14080 +63166 +13932 +83688 +90711 +90434 +71866 +28566 +20439 +37224 +77827 +64745 +26417 +64271 +81563 +12278 +15257 +97652 +10946 +81470 +47816 +29783 +62569 +71904 +55555 +30111 +97322 +84274 +25514 +19013 +84608 +99317 +77083 +14626 +50572 +21558 +68710 +50579 +98946 +57049 +34217 +88561 +38428 +35301 +68659 +78548 +38423 +25602 +26663 +39416 +35875 +23721 +58006 +52580 +95373 +12865 +72652 +78586 +94022 +25025 +42121 +87831 +48850 +83055 +52315 +93089 +25700 +72511 +39725 +80667 +70151 +92383 +55177 +59932 +42058 +56115 +44800 +74334 +12524 +88761 +83983 +29874 +57987 +99851 +33458 +79218 +59543 +21709 +19922 +41425 +13866 +49725 +51423 +59245 +87806 +79982 +28132 +56313 +37423 +21631 +90163 +64701 +69835 +63939 +69441 +90631 +54776 +25224 +82457 +92005 +18636 +66705 +57104 +48735 +94866 +83090 +40897 +88797 +85498 +30190 +66064 +29791 +66255 +41250 +94161 +54325 +45766 +33824 +45441 +85065 +15504 +91128 +47086 +62989 +46684 +21394 +85025 +30167 +63007 +92712 +90022 +64112 +32922 +82947 +27408 +92065 +60699 +45185 +81565 +43850 +90819 +67506 +40142 +59876 +73904 +21431 +85880 +75274 +63975 +42859 +45645 +34062 +41145 +58221 +41790 +34067 +75883 +64882 +92004 +54170 +53032 +41443 +24191 +68372 +62823 +92170 +79184 +38988 +16245 +61971 +58462 +13669 +95491 +80368 +54437 +49667 +57601 +36103 +61752 +87154 +11458 +95020 +74407 +76364 +74924 +74178 +28787 +30643 +97779 +18060 +33280 +19928 +16465 +96623 +35706 +19824 +79474 +46368 +81026 +74845 +87992 +10511 +17541 +99200 +92088 +30102 +95669 +31323 +49087 +13654 +41957 +69672 +73457 +69851 +51708 +81752 +42100 +65676 +67173 +56955 +47605 +56609 +96803 +20037 +84578 +73603 +26774 +69717 +25769 +65193 +68993 +31290 +35905 +75221 +71743 +15429 +88883 +53273 +53474 +30423 +87208 +21922 +56981 +84407 +92502 +44701 +37137 +46656 +85169 +42787 +32009 +76537 +75936 +64069 +94775 +11066 +96942 +39943 +99820 +82222 +67201 +45047 +52846 +31925 +75095 +67559 +70255 +14881 +66111 +52776 +48217 +27533 +76862 +93730 +19119 +20793 +28844 +75809 +79954 +89143 +15920 +98309 +61390 +91590 +36942 +43612 +62280 +81905 +69500 +30016 +37738 +97736 +95453 +83841 +89661 +54880 +30171 +43651 +32991 +77834 +86698 +54669 +86168 +20582 +63078 +40364 +48964 +91274 +23554 +62116 +47249 +65442 +87647 +67752 +69385 +35212 +55866 +86864 +17913 +70472 +78816 +74722 +69344 +69289 +67116 +17178 +54049 +10096 +10933 +17904 +73750 +24618 +55226 +95001 +77839 +57111 +24177 +86576 +44614 +81490 +24759 +11287 +74785 +27583 +30172 +89894 +42508 +25556 +18793 +32941 +99728 +28210 +27008 +84393 +65829 +49816 +73908 +22824 +27756 +84212 +51194 +50248 +13587 +54561 +14733 +53055 +31145 +16865 +96415 +87252 +58918 +43096 +27809 +76384 +90593 +94850 +84649 +70914 +37245 +15256 +95830 +72468 +68165 +49990 +30245 +80177 +19102 +60883 +94584 +11629 +83942 +98428 +29707 +36468 +86820 +21262 +60331 +29379 +48953 +73148 +97913 +24039 +43317 +34623 +14581 +97267 +29237 +83091 +46331 +69602 +28519 +14318 +26144 +28648 +37188 +95949 +44407 +49859 +46623 +75981 +57484 +85229 +82977 +10758 +10279 +37576 +94624 +95947 +69892 +81444 +13092 +14868 +33930 +57471 +72588 +41668 +10306 +87273 +41744 +35868 +53133 +75783 +10074 +53205 +92488 +38198 +20120 +78344 +99876 +69062 +43840 +48500 +59750 +67216 +16906 +98034 +41621 +93818 +61664 +45369 +20507 +82793 +87708 +36898 +52570 +36679 +26649 +75507 +31553 +17591 +22067 +48812 +49198 +26002 +42947 +12950 +71406 +22795 +87872 +78226 +94380 +56778 +63451 +16336 +20682 +41020 +73814 +82170 +25087 +30733 +70801 +31083 +87063 +42217 +10510 +56707 +13172 +53337 +25513 +39676 +48497 +98346 +17160 +14191 +86557 +12936 +66657 +14496 +10452 +27873 +57301 +84746 +11640 +11240 +13244 +29407 +72524 +70776 +78168 +45118 +95654 +63910 +52213 +71429 +55261 +40819 +77021 +62939 +43136 +54571 +61525 +78329 +16417 +24710 +98654 +11417 +97222 +36533 +63037 +33935 +85633 +53326 +38602 +64320 +84394 +22214 +40603 +12038 +91760 +30962 +69928 +91548 +61270 +52543 +96907 +94862 +36867 +78178 +96175 +18313 +29518 +47176 +16043 +98613 +24524 +50079 +50392 +96483 +23704 +79804 +59352 +28734 +66932 +84652 +81233 +61813 +39414 +61577 +52142 +99269 +65597 +76283 +59366 +96758 +34965 +53408 +15500 +47748 +21807 +43690 +58602 +64122 +54427 +64093 +14460 +89611 +63056 +80641 +20065 +53759 +53429 +33664 +98954 +18508 +73654 +36749 +38704 +58398 +15407 +79946 +65603 +37739 +10565 +12705 +53419 +76095 +74185 +38692 +35982 +20938 +99256 +21586 +77045 +83458 +68485 +19772 +24490 +82581 +62633 +39624 +28147 +53778 +37875 +95920 +25986 +97541 +52877 +94093 +68569 +93531 +72106 +88416 +54125 +98451 +22883 +70670 +19738 +87304 +12339 +10831 +99160 +51288 +93577 +84192 +43597 +92837 +21981 +53101 +61701 +23547 +34215 +90974 +85904 +14327 +91673 +55493 +97416 +64549 +57965 +58101 +18375 +69653 +69096 +87334 +41580 +11874 +44957 +86634 +51588 +92199 +88542 +22393 +68666 +39369 +46682 +76689 +47130 +13334 +81359 +25479 +91035 +86432 +10750 +22408 +30205 +17589 +37538 +22262 +16278 +24024 +91132 +94767 +70645 +88760 +94730 +13825 +23899 +22721 +78866 +40381 +67302 +83660 +82973 +46927 +50994 +75669 +93198 +63040 +88017 +85934 +61221 +34197 +98843 +42984 +33387 +96561 +91974 +29642 +66503 +52839 +45836 +12913 +26079 +77544 +68347 +87632 +50438 +52584 +61632 +98906 +90893 +10194 +46785 +51828 +82148 +77897 +53368 +18940 +32696 +71787 +86247 +56494 +50696 +43551 +95395 +64045 +46544 +86165 +96117 +98537 +33444 +54936 +39368 +82911 +58265 +95446 +79820 +89799 +40876 +42293 +36637 +19260 +98277 +62212 +68970 +43371 +21067 +75308 +44869 +49906 +45217 +50201 +99156 +20043 +43242 +47142 +23278 +78514 +56171 +27955 +86709 +96056 +13890 +82307 +35357 +34580 +62727 +21591 +98258 +74351 +17843 +23738 +18389 +65148 +32995 +51343 +54522 +90967 +95431 +57772 +57712 +52205 +24262 +47614 +65408 +50528 +11005 +10727 +45279 +92496 +34096 +12506 +25503 +39448 +81314 +66364 +85889 +39236 +56055 +90779 +18166 +53177 +43673 +36350 +55270 +65680 +82812 +50741 +36155 +14114 +20019 +84302 +44026 +34297 +22061 +71994 +90335 +39658 +58540 +34246 +83116 \ No newline at end of file From afaaabbce4799a9845841ca8ea97e402b7f169b0 Mon Sep 17 00:00:00 2001 From: Jason_000 Date: Sat, 7 Dec 2024 20:51:55 +0000 Subject: [PATCH 3/5] Correctly ignore test files --- ops/checkTests.du | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ops/checkTests.du b/ops/checkTests.du index 724962da3..4bf5c21bc 100644 --- a/ops/checkTests.du +++ b/ops/checkTests.du @@ -16,6 +16,10 @@ const ignored = { 'read.txt', 'read2.txt', ], + 'lists': [ + 'sorted.txt', + 'unsorted.txt', + ], 'strings': [ 'test', ], From cb6566a05c2779e0a5a56c547106945346e638b9 Mon Sep 17 00:00:00 2001 From: Jason_000 Date: Sat, 7 Dec 2024 20:57:32 +0000 Subject: [PATCH 4/5] Bump version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f22316470..1c0fb943a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-latest, macOS-13, macOS-12] + os: [macOS-latest, macOS-15, macOS-12] steps: - uses: actions/checkout@v3 From 25630763058aba063a468106428ee66e5d90a90f Mon Sep 17 00:00:00 2001 From: Jason_000 Date: Sat, 7 Dec 2024 20:58:55 +0000 Subject: [PATCH 5/5] Correct version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c0fb943a..5518e5207 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-latest, macOS-15, macOS-12] + os: [macOS-latest, macOS-15, macOS-13] steps: - uses: actions/checkout@v3