git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2ea67b3
)
Fix tests for inclusive fee charge rules
author
Maxim Mamontov
<faust.madf@gmail.com>
Mon, 19 Sep 2011 20:11:24 +0000
(23:11 +0300)
committer
Maxim Mamontov
<faust.madf@gmail.com>
Mon, 19 Sep 2011 20:11:24 +0000
(23:11 +0300)
tests/test_fee_charge_rules.cpp
patch
|
blob
|
history
diff --git
a/tests/test_fee_charge_rules.cpp
b/tests/test_fee_charge_rules.cpp
index 0b55e5de5f2b96dc20f8619483cc28163bb787b3..dfe7e850f18188f4d1a1b4714d81295bbab57f3e 100644
(file)
--- a/
tests/test_fee_charge_rules.cpp
+++ b/
tests/test_fee_charge_rules.cpp
@@
-87,7
+87,7
@@
namespace tut
user.ProcessDayFee();
ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
user.ProcessDayFee();
user.ProcessDayFee();
ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
user.ProcessDayFee();
- ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
+ ensure_equals("user.cash == 0", user.GetProperty().cash,
-5
0);
cash = 49;
ensure_equals("user.cash == 49", user.GetProperty().cash, 49);
user.ProcessDayFee();
cash = 49;
ensure_equals("user.cash == 49", user.GetProperty().cash, 49);
user.ProcessDayFee();
@@
-119,10
+119,11
@@
namespace tut
user.ProcessDayFee();
ensure_equals("user.cash == 50", user.GetProperty().cash, 50);
user.ProcessDayFee();
user.ProcessDayFee();
ensure_equals("user.cash == 50", user.GetProperty().cash, 50);
user.ProcessDayFee();
- ensure_equals("user.cash == 50", user.GetProperty().cash, 50);
- tariffs.SetFee(49);
+ ensure_equals("user.cash == 50", user.GetProperty().cash, 0);
+ cash = 50;
+ tariffs.SetFee(51);
user.ProcessDayFee();
user.ProcessDayFee();
- ensure_equals("user.cash ==
1", user.GetProperty().cash, 1
);
+ ensure_equals("user.cash ==
50", user.GetProperty().cash, 50
);
cash = 0;
ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
user.ProcessDayFee();
cash = 0;
ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
user.ProcessDayFee();