dimitrilw / toybox

Various data-structures and other toys implemented in Mojo🔥.
Apache License 2.0
2 stars 0 forks source link

error in Kruskal MST test with new quicksort package #8

Closed dimitrilw closed 6 months ago

dimitrilw commented 6 months ago

Run: mojo test -I .

Result:

Testing Time: 3.710s

Total Discovered Tests: 18

Passed : 16 (88.89%)
Failed : 2 (11.11%)
Skipped: 0 (0.00%)

******************** Failure: '/Users/dimitri/code/toybox/test/test_disjointset_example_kruskal_mst.mojo::test_disjointset_kruskal_mst_case_2()' ********************

/Users/ec2-user/actions-runner/_work/modular/modular/Kernels/mojo/stdlib/builtin/bool.mojo:59:8: note: see struct declaration here
error: /Users/dimitri/code/MOJO-PACKAGES/mojo-sort/quick_sort/sort.mojo:24:37: struct attribute field #0 has type '!pop.scalar<bool>' but corresponding struct field "value" expected 'i1'
    vector[a], vector[b] = vector[b], vector[a]
                                    ^

expression failed to parse (no further compiler diagnostics)
********************

******************** Failure: '/Users/dimitri/code/toybox/test/test_disjointset_example_kruskal_mst.mojo::test_disjointset_kruskal_mst_case_1()' ********************

/Users/ec2-user/actions-runner/_work/modular/modular/Kernels/mojo/stdlib/builtin/bool.mojo:59:8: note: see struct declaration here
error: /Users/dimitri/code/MOJO-PACKAGES/mojo-sort/quick_sort/sort.mojo:24:37: struct attribute field #0 has type '!pop.scalar<bool>' but corresponding struct field "value" expected 'i1'
    vector[a], vector[b] = vector[b], vector[a]
                                    ^

expression failed to parse (no further compiler diagnostics)
********************

Since core package (DisjointSet & Heap) are both functional, I published update. However, I will try to fix this example in the next few days.

dimitrilw commented 6 months ago

fixed; package was outdated; derp