The API's type for indexes is always an unsigned integer now, so we
don't need those tests anymore.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
#define DEFAULT_CLOCK_TIME 0
#define DEFAULT_CLOCK_VALUE 0
#define DEFAULT_CLOCK_TIME 0
#define DEFAULT_CLOCK_VALUE 0
static int64_t current_time = 42;
static int64_t current_time = 42;
/* Test bt_ctf_trace_get_environment_field_name */
ok(bt_ctf_trace_get_environment_field_name_by_index(NULL, 0) == NULL,
"bt_ctf_trace_get_environment_field_name handles a NULL trace correctly");
/* Test bt_ctf_trace_get_environment_field_name */
ok(bt_ctf_trace_get_environment_field_name_by_index(NULL, 0) == NULL,
"bt_ctf_trace_get_environment_field_name handles a NULL trace correctly");
- ok(bt_ctf_trace_get_environment_field_name_by_index(trace, -1) == NULL,
- "bt_ctf_trace_get_environment_field_name handles an invalid index correctly (negative)");
ok(bt_ctf_trace_get_environment_field_name_by_index(trace, 5) == NULL,
"bt_ctf_trace_get_environment_field_name handles an invalid index correctly (too large)");
ret_string = bt_ctf_trace_get_environment_field_name_by_index(trace, 0);
ok(bt_ctf_trace_get_environment_field_name_by_index(trace, 5) == NULL,
"bt_ctf_trace_get_environment_field_name handles an invalid index correctly (too large)");
ret_string = bt_ctf_trace_get_environment_field_name_by_index(trace, 0);
/* Test bt_ctf_trace_get_environment_field_value */
ok(bt_ctf_trace_get_environment_field_value_by_index(NULL, 0) == NULL,
"bt_ctf_trace_get_environment_field_value handles a NULL trace correctly");
/* Test bt_ctf_trace_get_environment_field_value */
ok(bt_ctf_trace_get_environment_field_value_by_index(NULL, 0) == NULL,
"bt_ctf_trace_get_environment_field_value handles a NULL trace correctly");
- ok(bt_ctf_trace_get_environment_field_value_by_index(trace, -1) == NULL,
- "bt_ctf_trace_get_environment_field_value handles an invalid index correctly (negative)");
ok(bt_ctf_trace_get_environment_field_value_by_index(trace, 5) == NULL,
"bt_ctf_trace_get_environment_field_value handles an invalid index correctly (too large)");
obj = bt_ctf_trace_get_environment_field_value_by_index(trace, 1);
ok(bt_ctf_trace_get_environment_field_value_by_index(trace, 5) == NULL,
"bt_ctf_trace_get_environment_field_value handles an invalid index correctly (too large)");
obj = bt_ctf_trace_get_environment_field_value_by_index(trace, 1);
"bt_ctf_trace_get_clock_class_count returns the correct number of clocks");
ok(!bt_ctf_trace_get_clock_class_by_index(NULL, 0),
"bt_ctf_trace_get_clock_class correctly handles NULL");
"bt_ctf_trace_get_clock_class_count returns the correct number of clocks");
ok(!bt_ctf_trace_get_clock_class_by_index(NULL, 0),
"bt_ctf_trace_get_clock_class correctly handles NULL");
- ok(!bt_ctf_trace_get_clock_class_by_index(trace, -1),
- "bt_ctf_trace_get_clock_class correctly handles negative indexes");
ok(!bt_ctf_trace_get_clock_class_by_index(trace, 1),
"bt_ctf_trace_get_clock_class correctly handles out of bound accesses");
ret_clock_class = bt_ctf_trace_get_clock_class_by_index(trace, 0);
ok(!bt_ctf_trace_get_clock_class_by_index(trace, 1),
"bt_ctf_trace_get_clock_class correctly handles out of bound accesses");
ret_clock_class = bt_ctf_trace_get_clock_class_by_index(trace, 0);