summaryrefslogtreecommitdiff
path: root/server/tests
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-12-25 12:54:59 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-12-25 12:54:59 +0100
commitfae209a9e93400c3a2072befda9c820634cf9278 (patch)
tree2d69e2c75fff0e08468c168f773abbc939a2ff03 /server/tests
parent94a1189d757f0269ac081ad2d750152e30564986 (diff)
Restructured repository.HEADmaster
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/SConscript11
-rw-r--r--server/tests/calculate_score.cpp47
-rw-r--r--server/tests/test_framework.cpp1
3 files changed, 0 insertions, 59 deletions
diff --git a/server/tests/SConscript b/server/tests/SConscript
deleted file mode 100644
index b6c3bea..0000000
--- a/server/tests/SConscript
+++ /dev/null
@@ -1,11 +0,0 @@
-Import('env')
-
-test_bld = Builder(
- action = '$SOURCE -e stdout && touch $TARGET',
- emitter = lambda target, source, env: (target[0].name + '.passed', env.Program(target[0].name + '.test', source))
-)
-
-env.Append(BUILDERS = {'Test' : test_bld})
-
-env.Test('calculate_score', ['calculate_score.cpp', 'test_framework.cpp',
- '../player.cpp', '../client.cpp', '../connection.cpp', '../hand.cpp', '../score.cpp'] + Glob('../../common/*.cpp'))
diff --git a/server/tests/calculate_score.cpp b/server/tests/calculate_score.cpp
deleted file mode 100644
index b78e763..0000000
--- a/server/tests/calculate_score.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#define BOOST_TEST_MODULE calculate_score
-#include <boost/test/unit_test.hpp>
-
-#include <boost/assign/list_of.hpp>
-using boost::assign::list_of;
-
-#include "../player.h"
-
-BOOST_AUTO_TEST_CASE(tsumo_tanyao) {
- Player player;
- player.client = make_shared<ClientDumb>();
- player.round_start(0);
-
- player.hand = list_of
- (Tile::Man_2)(Tile::Man_2)(Tile::Man_2)
- (Tile::Pin_2)(Tile::Pin_3)(Tile::Pin_4)
- (Tile::Sou_2)(Tile::Sou_2)(Tile::Sou_2)
- (Tile::Man_8)(Tile::Man_8);
-
- player.declare_tsumo();
-
- BOOST_CHECK_EQUAL(player.won, true);
- BOOST_CHECK_EQUAL(player.won_value.yaku, 2);
- BOOST_CHECK_EQUAL(player.won_value.fu, 32);
- BOOST_CHECK_EQUAL(player.won_value.tsumo(), 700);
- BOOST_CHECK_EQUAL(player.won_value.tsumo_east(), 1300);
-}
-
-BOOST_AUTO_TEST_CASE(ron_tanyao) {
- Player player;
- player.client = make_shared<ClientDumb>();
- player.round_start(0);
-
- player.hand = list_of
- (Tile::Man_2)(Tile::Man_2)(Tile::Man_2)
- (Tile::Pin_2)(Tile::Pin_3)(Tile::Pin_4)
- (Tile::Sou_2)(Tile::Sou_2)(Tile::Sou_2)
- (Tile::Man_8);
-
- player.declare_ron(Tile::Man_8);
-
- BOOST_CHECK_EQUAL(player.won, true);
- BOOST_CHECK_EQUAL(player.won_value.yaku, 1);
- BOOST_CHECK_EQUAL(player.won_value.fu, 40);
- BOOST_CHECK_EQUAL(player.won_value.ron(), 1300);
- BOOST_CHECK_EQUAL(player.won_value.ron_east(), 2000);
-}
diff --git a/server/tests/test_framework.cpp b/server/tests/test_framework.cpp
deleted file mode 100644
index 67373e9..0000000
--- a/server/tests/test_framework.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include <boost/test/included/unit_test.hpp>