gtheler il y a 5 ans
Parent
révision
10472d1a1b
4 fichiers modifiés avec 14 ajouts et 8 suppressions
  1. +2
    -2
      Makefile.am
  2. +0
    -6
      blackjack.conf
  3. +6
    -0
      check-internal.sh
  4. +6
    -0
      check-stand.sh

+ 2
- 2
Makefile.am Voir le fichier

@@ -7,8 +7,8 @@
AUTOMAKE_OPTIONS = subdir-objects
dist_doc_DATA = README doc/blackjack.texi

# TESTS = check-internal.sh check-stand.sh
# EXTRA_DIST = config.rpath m4/ChangeLog blackjack.conf players $(TESTS)
TESTS = check-internal.sh check-stand.sh
EXTRA_DIST = config.rpath m4/ChangeLog players $(TESTS)

ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = blackjack

+ 0
- 6
blackjack.conf Voir le fichier

@@ -1,6 +0,0 @@
; flat_bet = 1
; no_insurance = true
; delay = 0

; arranged_cards = 2,1,11
; rng_seed = 1

+ 6
- 0
check-internal.sh Voir le fichier

@@ -0,0 +1,6 @@
if [ ! -z "$(which awk)" ]; then
./blackjack -i 2>&1 | grep mean | awk '{e=-7e-3;s=5e-3} END {ok = ($2>(e-s)&&$2<(e+s)); print ok?"ok":"failed"; exit !ok }'
result=$?
else
result=77
fi

+ 6
- 0
check-stand.sh Voir le fichier

@@ -0,0 +1,6 @@
if [ ! -z "`which awk`" ]; then
yes stand | ./blackjack -n5e5 --flat_bet=true --no_insurance=true 2>&1 | grep mean | awk '{e=-0.15;s=1e-2} END {ok = ($2>(e-s)&&$2<(e+s)); print ok?"ok":"failed"; exit !ok }'
result=$?
else
result=77
fi

Chargement…
Annuler
Enregistrer