Skip to content

Commit

Permalink
change uiua recursion limit for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KatieLG committed Dec 15, 2024
1 parent ee4e383 commit 5b4606d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/uiua-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ jobs:

- name: Run uiua tests
run: uiua run tests/test_solutions.ua
env:
UIUA_RECURSION_LIMIT: 1000
8 changes: 4 additions & 4 deletions AOC/uiua/solutions/day10.ua
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Input ← (
⊜∵⋕≠,@\n # convert to number grid
)

W ← ⧻⊢Input
H ← ⧻Input
Valid ← /↧[⊃⊓(<W|<H)∩≥₀]°⊟ # is point within grid
Moves ← ▽⊸≡Valid+⊙¤ # get valid neighbouring moves round a point
W ← ⧻⊢Input
H ← ⧻Input
Valid ← /↧[⊃⊓(<W|<H)∩≥₀]°⊟ # is point within grid
Moves ← ▽⊸≡Valid+⊙¤ # get valid neighbouring moves round a point
Nbrs ← (
[∩¯,,⇌.⇡2] # each direction
⊃(⟜⊡Moves|⋅⊡) # get grid values at current coord and valid moves
Expand Down
24 changes: 11 additions & 13 deletions AOC/uiua/tests/test_solutions.ua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ TestDay ← (
GetSolution⊙(⇌⊟) # get the actual solution
⍤.≍ # assert matching
)
SkipDay ← (
&p $"Skipping tests for day _: _" ↙₋₂$"0_" # skip with reason
)

# ---- Tests -----
~ "../solutions/day01.ua"
Expand All @@ -41,30 +44,26 @@ TestDay 4
~ "../solutions/day05.ua"
TestDay 5

# TODO - improve runtime
# ~ "../solutions/day06.ua"
# TestDay 6
# TODO
SkipDay 6 "runtime is too long"

~ "../solutions/day07.ua"
TestDay 7

~ "../solutions/day08.ua"
TestDay 8

# TODO - part b
# ~ "../solutions/day09.ua"
# TestDay 9
# TODO
SkipDay 9 "Missing part b"

~ "../solutions/day10.ua"
TestDay 10

# TODO - check why recursion limit is being exceeded
# ~ "../solutions/day11.ua"
# TestDay 11
~ "../solutions/day11.ua"
TestDay 11

# TODO
# ~ "../solutions/day12.ua"
# TestDay 12
SkipDay 12 "Not done yet"

~ "../solutions/day13.ua"
TestDay 13
Expand All @@ -73,5 +72,4 @@ TestDay 13
TestDay 14

# TODO
# ~ "../solutions/day15.ua"
# TestDay 15
SkipDay 15 "Not done yet"

0 comments on commit 5b4606d

Please sign in to comment.