Compare commits
7 Commits
41797a07b8
...
64d4d6c71c
| Author | SHA1 | Date | |
|---|---|---|---|
| 64d4d6c71c | |||
| cd382540a4 | |||
| e045407993 | |||
| 877ad0ad1a | |||
| 510415982d | |||
| 1b976d4d32 | |||
| 0a8d951cfa |
4
main.cpp
4
main.cpp
@ -8,10 +8,10 @@
|
||||
#endif
|
||||
|
||||
#ifndef ALPHA
|
||||
#define ALPHA 0.99
|
||||
#define ALPHA 0.9999
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main()
|
||||
{
|
||||
int number_of_items = 0;
|
||||
int capacity = 0;
|
||||
|
||||
14
run.bat
14
run.bat
@ -1,5 +1,15 @@
|
||||
:: Uso: [set EXEC="caminho/do/executavel.exe"] && [set TEST_FOLDER="caminho/dos/casetests"] && run.bat
|
||||
@ECHO off
|
||||
|
||||
for %%g in (test/*) do (
|
||||
"build/solucao.exe" < test/%%g
|
||||
if not defined EXEC (
|
||||
set EXEC="build/solucao.exe"
|
||||
)
|
||||
|
||||
if not defined TEST_FOLDER (
|
||||
set TEST_FOLDER=test
|
||||
)
|
||||
|
||||
for %%g in (%TEST_FOLDER%/*) do (
|
||||
echo Arquivo de teste: %TEST_FOLDER%/%%g
|
||||
%EXEC% < %TEST_FOLDER%/%%g
|
||||
)
|
||||
13
run.sh
13
run.sh
@ -2,6 +2,15 @@
|
||||
|
||||
IFS=$'\n'
|
||||
|
||||
for file in $(find test -type f); do
|
||||
build/main.out < $file
|
||||
if [[ -z $EXEC ]]; then
|
||||
EXEC="build/main.out"
|
||||
fi
|
||||
|
||||
if [[ -z $TEST_FOLDER ]]; then
|
||||
TEST_FOLDER="test"
|
||||
fi
|
||||
|
||||
for file in $(find "$TEST_FOLDER" -type f); do
|
||||
echo "Arquivo de teste: $file"
|
||||
"$EXEC" < "$file"
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user