From bb9c7bea2a3e3333511aba6da931b759266f3157 Mon Sep 17 00:00:00 2001 From: hrocho Date: Fri, 17 Nov 2017 10:49:28 +0100 Subject: [PATCH] tests --- tests/test_storage.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_storage.cpp b/tests/test_storage.cpp index 4b7b646..50307ba 100644 --- a/tests/test_storage.cpp +++ b/tests/test_storage.cpp @@ -60,13 +60,21 @@ const lest::test specification[] = EXPECT(catima::_storage.get_index()==0); catima::_storage.Add(p,water); + auto dp = catima::_storage.Get(0); EXPECT(catima::_storage.get_index()==1); - + EXPECT(dp.p.A==12); + EXPECT(dp.m.ncomponents()==2); catima::_storage.Add(p,water); + auto dp2 = catima::_storage.Get(1); EXPECT(catima::_storage.get_index()==1); + EXPECT(dp2.p.A==0); + EXPECT(dp2.m.ncomponents()==0); catima::_storage.Add(p,graphite); + auto dp3 = catima::_storage.Get(1); EXPECT(catima::_storage.get_index()==2); + EXPECT(dp3.p.A==12); + EXPECT(dp3.m.ncomponents()==1); catima::_storage.Add(p,graphite); EXPECT(catima::_storage.get_index()==2);