From 0291d85529b4ff7cc6ef617f0ee08f63e122ec10 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 19 Jan 2018 16:59:52 +0100 Subject: [PATCH] make sure that jewels are what is sold in tests. --- src/economy.test.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/economy.test.c b/src/economy.test.c index ff21f4622..282c9fc64 100644 --- a/src/economy.test.c +++ b/src/economy.test.c @@ -206,15 +206,16 @@ static region *setup_trade_region(CuTest *tc, const struct terrain_type *terrain item_type *it_luxury; struct locale * lang = default_locale; - new_luxurytype(it_luxury = test_create_itemtype("jewel"), 5); - locale_setstring(lang, it_luxury->rtype->_name, it_luxury->rtype->_name); - CuAssertStrEquals(tc, it_luxury->rtype->_name, LOC(lang, resourcename(it_luxury->rtype, 0))); - new_luxurytype(it_luxury = test_create_itemtype("balm"), 5); locale_setstring(lang, it_luxury->rtype->_name, it_luxury->rtype->_name); CuAssertStrEquals(tc, it_luxury->rtype->_name, LOC(lang, resourcename(it_luxury->rtype, 0))); + new_luxurytype(it_luxury = test_create_itemtype("jewel"), 5); + locale_setstring(lang, it_luxury->rtype->_name, it_luxury->rtype->_name); + CuAssertStrEquals(tc, it_luxury->rtype->_name, LOC(lang, resourcename(it_luxury->rtype, 0))); + r = test_create_region(0, 0, terrain); + setluxuries(r, it_luxury->rtype->ltype); return r; }