#!/bin/bash

# Haskell Unit Tests

SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$SCRIPT_DIR"

echo "=== Haskell Pi-beräkning Unit Tester ==="
echo ""

cd src
ghc -o ../bin/pi_test PiTest.hs
if [ $? -eq 0 ]; then
    ../bin/pi_test
    exit $?
else
    echo "✗ Kompilering av tester misslyckades!"
    exit 1
fi