Ignore:
Timestamp:
Jun 26, 2014, 8:01:54 PM (10 years ago)
Author:
katerina
Message:

Fix for ticket #353 (multiple exclusions for SUID check).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cutest_zAVLTree.c

    r366 r452  
    3737  int result;
    3838  int counter = 0;
     39
     40  char * str;
    3941
    4042  struct ztest z1 = { "abc"  , 1 };
     
    483485  CuAssertTrue (tc, iz8.iname == 0);
    484486
     487  ztest_tree = NULL;
     488  str = strdup("foo");
     489  result = zAVL_string_set(&ztest_tree, str);
     490  CuAssertTrue(tc, 0 == result);
     491  CuAssertPtrNotNull(tc, ztest_tree);
     492  CuAssertStrEquals(tc, "foo", zAVL_string_get(ztest_tree, "foo"));
     493
     494  str = strdup("bar");
     495  result = zAVL_string_set(&ztest_tree, str);
     496  CuAssertTrue(tc, 0 == result);
     497  CuAssertStrEquals(tc, "foo", zAVL_string_get(ztest_tree, "foo"));
     498  CuAssertStrEquals(tc, "bar", zAVL_string_get(ztest_tree, "bar"));
     499
     500  str = strdup("balloon");
     501  result = zAVL_string_set(&ztest_tree, str);
     502  CuAssertTrue(tc, 0 == result);
     503  CuAssertStrEquals(tc, "foo", zAVL_string_get(ztest_tree, "foo"));
     504  CuAssertStrEquals(tc, "bar", zAVL_string_get(ztest_tree, "bar"));
     505  CuAssertStrEquals(tc, "balloon", zAVL_string_get(ztest_tree, "balloon"));
     506
     507  str = zAVL_string_get(ztest_tree, "foobar");
     508  CuAssertTrue(tc, str == NULL);
     509  str = zAVL_string_get(ztest_tree, "");
     510  CuAssertTrue(tc, str == NULL);
     511  str = zAVL_string_get(ztest_tree, NULL);
     512  CuAssertTrue(tc, str == NULL);
     513
     514  zAVL_string_reset(ztest_tree);
     515  str = zAVL_string_get(ztest_tree, "foo");
     516  CuAssertTrue(tc, str == NULL);
     517  str = zAVL_string_get(ztest_tree, "bar");
     518  CuAssertTrue(tc, str == NULL);
     519  str = zAVL_string_get(ztest_tree, "balloon");
     520  CuAssertTrue(tc, str == NULL);
    485521
    486522}
Note: See TracChangeset for help on using the changeset viewer.