#!/bin/sh -e

rm -rf tests++/testdata
mkdir -p tests++/testdata
cp tests/testdata_dist/* tests++/testdata

curl -sSL -o /tmp/dectest.zip https://speleotrove.com/decimal/dectest.zip
unzip -qq -d tests++/testdata /tmp/dectest.zip

make -C tests++ runtest_shared apitest_shared
(cd tests++ && ./runtest_shared official.topTest --thread)
(cd tests++ && ./runtest_shared additional.topTest --thread)
(cd tests++ && ./apitest_shared)
(cd tests++ && ./apitest_shared --thread)
