Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
3.7

Conflicts:
	symmetric-client-clib-test/src/util/MapTest.c
  • Loading branch information
mmichalek committed Nov 10, 2015
2 parents 281632b + 0dd6d10 commit 584bffa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions symmetric-client-clib-test/src/symclient_test.c
Expand Up @@ -26,11 +26,11 @@ int main() {
}

if (
SymEngineTest_CUnit() != CUE_SUCCESS ||
//SymEngineTest_CUnit() != CUE_SUCCESS ||
//SymMapTest_CUnit() != CUE_SUCCESS ||
//SymListTest_CUnit() != CUE_SUCCESS ||
//SymStringBuilderTest_CUnit() != CUE_SUCCESS ||
//SymStringArrayTest_CUnit() != CUE_SUCCESS ||
SymStringArrayTest_CUnit() != CUE_SUCCESS ||
//SymPropertiesTest_CUnit() != CUE_SUCCESS ||
//SymStringUtilsTest_CUnit() != CUE_SUCCESS ||
//SymHexTest_CUnit() != CUE_SUCCESS ||
Expand Down
19 changes: 19 additions & 0 deletions symmetric-client-clib-test/src/util/MapTest.c
Expand Up @@ -321,6 +321,25 @@ void SymMapTest_testResetRemove() {
CU_ASSERT(map->get(map, "1") == NULL);
}

void SymMapTest_testResetRemove() {
int mapSize = 16;
SymMap *map = SymMap_new(NULL, mapSize);
int i;
for (i = 0; i < mapSize; i++) {
map->put(map, SymStringUtils_format("%d", i), SymStringUtils_format("value %d", i));
}
CU_ASSERT(SymStringUtils_equals(map->get(map, "1"), "value 1"));
map->reset(map);
CU_ASSERT(map->get(map, "1") == NULL);
map->remove(map, "1");
CU_ASSERT(map->get(map, "1") == NULL);

map->put(map, "1", "value 1");
CU_ASSERT(SymStringUtils_equals(map->get(map, "1"), "value 1"));
map->remove(map, "1");
CU_ASSERT(map->get(map, "1") == NULL);
}

int SymMapTest_CUnit() {
CU_pSuite suite = CU_add_suite("SymMapTest", NULL, NULL);
if (suite == NULL) {
Expand Down
2 changes: 1 addition & 1 deletion symmetric-client-native/run/sym-mac.launch
Expand Up @@ -37,7 +37,7 @@
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList/&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList/&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList/&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList&gt;&#10;&lt;memoryBlockExpressionItem&gt;&#10;&lt;expression text=&quot;0x10080b000&quot;/&gt;&#10;&lt;/memoryBlockExpressionItem&gt;&#10;&lt;/memoryBlockExpressionList&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/sym"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="symmetric-client-native"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
Expand Down

0 comments on commit 584bffa

Please sign in to comment.