-#if 0
- value.type = EC_CONFIG_TYPE_NODE;
- value.node = ec_node_clone(node);
- ret = ec_config_set(config, "node", value);
- testres |= EC_TEST_CHECK(ret == 0, "cannot set node");
- pvalue = ec_config_get(config, "node");
- testres |= EC_TEST_CHECK(
- pvalue != NULL &&
- ec_config_cmp(pvalue, &value) == 0,
- "unexpected node value");
-
- subconfig = ec_config(dict, EC_COUNT_OF(dict));
- if (subconfig == NULL)
- goto fail;
-
- value.type = EC_CONFIG_TYPE_INT64;
- value.i64 = 4321;
- ret = ec_config_set(subconfig, "int", value);
- testres |= EC_TEST_CHECK(ret == 0, "cannot set int");
- pvalue = ec_config_get(subconfig, "int");
- testres |= EC_TEST_CHECK(
- pvalue != NULL &&
- ec_config_cmp(pvalue, &value) == 0,
- "unexpected int value");
-
- value.type = EC_CONFIG_TYPE_DICT;
- value.dict = subconfig;
- subconfig = NULL; /* will be freed when freeing config */
- ret = ec_config_set(config, "dict", value);
- testres |= EC_TEST_CHECK(ret == 0, "cannot set dict");
- pvalue = ec_config_get(config, "dict");
- testres |= EC_TEST_CHECK(
- pvalue != NULL &&
- ec_config_cmp(pvalue, &value) == 0,
- "unexpected dict value");
-
- value.type = EC_CONFIG_TYPE_INT64;
- value.i64 = 4321;
- pvalue = ec_config_get(
- ec_config_get(config, "dict")->dict, "int");
- testres |= EC_TEST_CHECK(
- pvalue != NULL &&
- ec_config_cmp(pvalue, &value) == 0,
- "unexpected int value");
-
- value.type = EC_CONFIG_TYPE_INT64;
- value.i64 = 1;
- ret = ec_config_add(config, "intlist", value);
- testres |= EC_TEST_CHECK(ret == 0, "cannot add int in list");
- value.type = EC_CONFIG_TYPE_INT64;
- value.i64 = 2;
- ret = ec_config_add(config, "intlist", value);
- testres |= EC_TEST_CHECK(ret == 0, "cannot add int in list");
- value.type = EC_CONFIG_TYPE_INT64;
- value.i64 = 3;
- ret = ec_config_add(config, "intlist", value);
- testres |= EC_TEST_CHECK(ret == 0, "cannot add int in list");
-
- value.type = EC_CONFIG_TYPE_INT64;
- value.i64 = 4321;
- ret = ec_config_set(config, "invalid", value);
- testres |= EC_TEST_CHECK(ret < 0,
- "should not be able to set invalid key");
- pvalue = ec_config_get(config, "invalid");
- testres |= EC_TEST_CHECK(pvalue == NULL,
- "invalid key returned a value");
-
-#endif