mirror of
https://github.com/Pithikos/C-Thread-Pool
synced 2024-11-21 21:21:23 +03:00
34 lines
395 B
Bash
34 lines
395 B
Bash
|
#! /bin/bash
|
||
|
|
||
|
#
|
||
|
# This file has several tests to check that the API
|
||
|
# works to an acceptable standard.
|
||
|
#
|
||
|
|
||
|
. funcs.sh
|
||
|
|
||
|
|
||
|
# ---------------------------- Tests -----------------------------------
|
||
|
|
||
|
|
||
|
function test_api {
|
||
|
echo "Testing API calls.."
|
||
|
compile src/api.c
|
||
|
output=`./test`
|
||
|
if [[ $? != 0 ]]; then
|
||
|
err "$output" "$output"
|
||
|
exit 1
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
# Run tests
|
||
|
test_api
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
echo "No API errors"
|