From 7088148f5bf86eab82d5d3ad9b710c17d5e4faff Mon Sep 17 00:00:00 2001 From: hrocho Date: Sat, 11 May 2019 19:18:35 +0200 Subject: [PATCH] test fix --- tests/test_storage.cpp | 10 +++++----- tests/test_structures.cpp | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/test_storage.cpp b/tests/test_storage.cpp index 12e0d97..33c5f2b 100644 --- a/tests/test_storage.cpp +++ b/tests/test_storage.cpp @@ -49,10 +49,7 @@ const lest::test specification[] = catima::Material graphite({ {12,6,1} }); - - catima::Config c1; - c1.z_effective = catima::z_eff_type::global; - + catima::_storage.Reset(); EXPECT(catima::_storage.get_index()==0); @@ -76,12 +73,15 @@ const lest::test specification[] = catima::_storage.Add(p,graphite); EXPECT(catima::_storage.get_index()==2); + catima::Config c1; + c1.z_effective = catima::z_eff_type::global; + catima::_storage.Add(p,graphite, c1); EXPECT(catima::_storage.get_index()==3); catima::_storage.Add(p,graphite); EXPECT(catima::_storage.get_index()==3); - c1.z_effective = catima::z_eff_type::atima14; + c1.z_effective = catima::z_eff_type::hubert; catima::_storage.Add(p,graphite ,c1); EXPECT(catima::_storage.get_index()==4); diff --git a/tests/test_structures.cpp b/tests/test_structures.cpp index 76d7705..9ef08d8 100644 --- a/tests/test_structures.cpp +++ b/tests/test_structures.cpp @@ -160,19 +160,21 @@ const lest::test specification[] = catima::Config c2; catima::Config c3{catima::z_eff_type::none}; catima::Config c4; - EXPECT(c1.z_effective == catima::z_eff_type::pierce_blann); - EXPECT(c1.z_effective != catima::z_eff_type::atima14); + EXPECT(c1.z_effective == catima::default_config.z_effective); + EXPECT(c1==c2); EXPECT( !(c1==c3)); EXPECT(c1==c4); + c4.z_effective = catima::z_eff_type::global; EXPECT(!(c1==c4)); auto c5 = c4; EXPECT(c4==c5); - c4.z_effective = catima::z_eff_type::atima14; + + c4.z_effective = catima::z_eff_type::hubert; EXPECT(!(c4==c5) ); EXPECT(!(c4==c1)); - c4.z_effective = catima::z_eff_type::pierce_blann; + c4.z_effective = catima::default_config.z_effective; EXPECT(!(c5==c4)); EXPECT((c1==c4)); },