瀏覽代碼

tests

master
gtheler 5 年之前
父節點
當前提交
10472d1a1b
共有 4 個檔案被更改,包括 14 行新增8 行删除
  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 查看文件

AUTOMAKE_OPTIONS = subdir-objects AUTOMAKE_OPTIONS = subdir-objects
dist_doc_DATA = README doc/blackjack.texi 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 ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = blackjack bin_PROGRAMS = blackjack

+ 0
- 6
blackjack.conf 查看文件

; flat_bet = 1
; no_insurance = true
; delay = 0

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

+ 6
- 0
check-internal.sh 查看文件

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 查看文件

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

Loading…
取消
儲存