#!/bin/sh

cd "$(dirname "$0")/tests" || exit 1

for d in . mpz mpn mpf mpq rand misc cxx; do
    [ -d "$d" ] || continue
    for test in $(find "$d" -maxdepth 1 -type f -executable | sort); do
        testname=$(echo "$test" | sed 's|^\./||')
        if ./"$test"; then
            echo "PASS: $testname"
        else
            echo "FAIL: $testname"
        fi
    done
done
