diff --git a/applications/test/DynamicList/Test-DynamicList.C b/applications/test/DynamicList/Test-DynamicList.C index 7b73a214c9..c8e2ed4a93 100644 --- a/applications/test/DynamicList/Test-DynamicList.C +++ b/applications/test/DynamicList/Test-DynamicList.C @@ -111,13 +111,15 @@ int main(int argc, char *argv[]) // test the transfer between DynamicLists - DynamicList dlA; + DynamicList dlA + { + 0, 1, 2, 3, 4 + }; + dlA.append({ 5, 6 }); + dlA = { 1, 2, 4 }; + DynamicList dlB; - for (label i = 0; i < 5; i++) - { - dlA.append(i); - } dlA.setCapacity(10); Info<< "" << dlA << "" << nl << "sizes: " diff --git a/applications/test/HashSet/Test-hashSet.C b/applications/test/HashSet/Test-hashSet.C index 0d22207c2f..bc219e9b96 100644 --- a/applications/test/HashSet/Test-hashSet.C +++ b/applications/test/HashSet/Test-hashSet.C @@ -25,6 +25,7 @@ Description \*---------------------------------------------------------------------------*/ +#include "hashedWordList.H" #include "HashSet.H" #include "Map.H" @@ -35,31 +36,57 @@ using namespace Foam; int main(int argc, char *argv[]) { - wordHashSet setA(0); - HashTable tableA; + hashedWordList words + { + "abc", + "def", + "ghi" + }; + words = { "def", "ghi", "xy", "all", "begin", "all" }; + + wordHashSet setA + { + "xx", + "yy", + "zz" + }; + + setA = { "kjhk", "kjhk2", "abced" }; + + HashTable tableA + { + { "value1", 1 }, + { "value2", 2 }, + { "value3", 3 } + }; HashTable tableB; - Map