Something went wrong. Try again.
Newt - a dependent typed programming language
This is a mirror of the main github repository. newt.cloakedarrow.com
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637#!/bin/shmkdir -p tmpecho "Test AoC 2024 solutions"# FIXME - it turns out there are some stack issues here (including length)NCC="node build/newt.js"total=0failed=0for fn in aoc2024/Day*.newt; do total=$((total + 1)) echo Test $fn bn=$(basename $fn) $NCC $fn -o out.js > tmp/${bn}.compile if [ $? != "0" ]; then echo Compile failed for $fn failed=$((failed + 1)) continue fi # if there is a golden file, run the code and compare output if [ -f ${fn}.golden ]; then node out.js > tmp/${bn}.out if [ $? != "0" ]; then echo Run failed for $fn failed=$((failed + 1)) continue fi if ! diff -q tmp/${bn}.out ${fn}.golden; then echo "Output mismatch for $fn" failed=$((failed + 1)) fi fidoneecho "Total tests: $total"echo "Failed tests: $failed"