From: Maxim Mamontov Date: Fri, 8 Apr 2011 12:54:55 +0000 (+0300) Subject: Fix tests compilation errors X-Git-Tag: 2.407-rc3~23 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/65b0dbf24af3d566eefab9e7244bdcb383e78f83?ds=sidebyside Fix tests compilation errors --- diff --git a/tests/Makefile b/tests/Makefile index 2364db74..0635185c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -6,9 +6,10 @@ SOURCES=main.cpp \ test_raw_ip.cpp \ test_admin_conf.cpp \ test_tariff.cpp \ - test_stgconffiles.cpp \ - ../projects/stargazer/tariff.cpp \ - ../stglibs/stgconffiles.lib/stgconffiles.cpp + test_conffiles.cpp \ + ../projects/stargazer/tariff_impl.cpp \ + ../stglibs/conffiles.lib/conffiles.cpp \ + ../stglibs/common.lib/common.cpp all: $(PROG) diff --git a/tests/raw_ip_packet_old.h b/tests/raw_ip_packet_old.h index 1fbfe5f3..adf91a09 100644 --- a/tests/raw_ip_packet_old.h +++ b/tests/raw_ip_packet_old.h @@ -6,7 +6,7 @@ #include -#include "const.h" +#include "stg/const.h" #define IPv4 (2) diff --git a/tests/test_admin_conf.cpp b/tests/test_admin_conf.cpp index 52f09eeb..add65fb2 100644 --- a/tests/test_admin_conf.cpp +++ b/tests/test_admin_conf.cpp @@ -2,7 +2,7 @@ #include "tut/tut.hpp" -#include "admin_conf.h" +#include "stg/admin_conf.h" namespace tut { diff --git a/tests/test_conffiles.cpp b/tests/test_conffiles.cpp index e48abaf2..ee2eeea7 100644 --- a/tests/test_conffiles.cpp +++ b/tests/test_conffiles.cpp @@ -5,7 +5,7 @@ #include "tut/tut.hpp" -#include "conffiles.h" +#include "stg/conffiles.h" namespace tut { diff --git a/tests/test_raw_ip.cpp b/tests/test_raw_ip.cpp index 9c4e521f..3b3a97fa 100644 --- a/tests/test_raw_ip.cpp +++ b/tests/test_raw_ip.cpp @@ -9,7 +9,7 @@ #include "tut/tut.hpp" #include "raw_ip_packet_old.h" -#include "raw_ip_packet.h" +#include "stg/raw_ip_packet.h" #ifndef ITERATIONS #define ITERATIONS 1000 diff --git a/tests/test_tariff.cpp b/tests/test_tariff.cpp index e00b4817..f999b011 100644 --- a/tests/test_tariff.cpp +++ b/tests/test_tariff.cpp @@ -1,7 +1,7 @@ #include "tut/tut.hpp" -#include "tariff_conf.h" -#include "tariff.h" +#include "stg/tariff_conf.h" +#include "tariff_impl.h" namespace tut { @@ -35,7 +35,7 @@ namespace tut td.dirPrice[0].threshold = 4; td.dirPrice[0].singlePrice = 0; td.dirPrice[0].noDiscount = 0; - TARIFF tariff(td); + TARIFF_IMPL tariff(td); ensure("freeMb = 2", tariff.GetFreeMb() == td.tariffConf.free); ensure("passiveCost = 4", tariff.GetPassiveCost() == td.tariffConf.passiveCost); @@ -75,7 +75,7 @@ namespace tut td.dirPrice[0].threshold = 4; td.dirPrice[0].singlePrice = 0; td.dirPrice[0].noDiscount = 0; - TARIFF tariff(td); + TARIFF_IMPL tariff(td); ensure("traffType = TRAFF_UP", tariff.GetTraffType() == TRAFF_UP); ensure_equals("traffByType(6, 0) = 6 for UP", tariff.GetTraffByType(6, 0), 6); @@ -145,7 +145,7 @@ namespace tut td.dirPrice[0].threshold = 4; td.dirPrice[0].singlePrice = 0; td.dirPrice[0].noDiscount = 0; - TARIFF tariff(td); + TARIFF_IMPL tariff(td); ensure_equals("0000 == 0", tariff.GetPriceWithTraffType(0, 0 * 1024 * 1024, 0, 1286461245), 0); // Near 17:30, 0 < 4 DA ensure_equals("0001 == 0", tariff.GetPriceWithTraffType(0, 6 * 1024 * 1024, 0, 1286461245), 1); // Near 17:30, 6 > 4 DB @@ -201,7 +201,7 @@ namespace tut td.dirPrice[0].threshold = 4; td.dirPrice[0].singlePrice = 0; td.dirPrice[0].noDiscount = 0; - TARIFF tariff(td); + TARIFF_IMPL tariff(td); ensure("freeMb = 2", tariff.GetFreeMb() == td.tariffConf.free); ensure("passiveCost = 4", tariff.GetPassiveCost() == td.tariffConf.passiveCost); @@ -241,7 +241,7 @@ namespace tut td.dirPrice[0].threshold = 4; td.dirPrice[0].singlePrice = 0; td.dirPrice[0].noDiscount = 0; - TARIFF tariff(td); + TARIFF_IMPL tariff(td); ensure("traffType = TRAFF_UP", tariff.GetTraffType() == TRAFF_UP); ensure_equals("traffByType(6, 0) = 6 for UP", tariff.GetTraffByType(6, 0), 6); @@ -311,7 +311,7 @@ namespace tut td.dirPrice[0].threshold = 4; td.dirPrice[0].singlePrice = 0; td.dirPrice[0].noDiscount = 0; - TARIFF tariff(td); + TARIFF_IMPL tariff(td); ensure_equals("0000 == 0", tariff.GetPriceWithTraffType(0, 0 * 1024 * 1024, 0, 1286461245), 2); // Near 17:30, 0 < 4 NA ensure_equals("0001 == 0", tariff.GetPriceWithTraffType(0, 6 * 1024 * 1024, 0, 1286461245), 3); // Near 17:30, 6 > 4 NB