-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed util abort test for altered function
- Loading branch information
1 parent
f0b6433
commit 367e7e8
Showing
2 changed files
with
3 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,22 @@ | ||
#include <cassert> | ||
#include <stdlib.h> | ||
|
||
#include <ert/job_queue/job_node.hpp> | ||
#include <ert/util/test_util.hpp> | ||
|
||
void test_create() { | ||
job_queue_node_type *node = job_queue_node_alloc( | ||
"name", "/tmp", "ls", 0, stringlist_alloc_new(), 1, NULL, NULL); | ||
job_queue_node_free(node); | ||
} | ||
|
||
void call_get_queue_index(void *arg) { | ||
auto node = static_cast<job_queue_node_type *>(arg); | ||
job_queue_node_get_queue_index(node); | ||
} | ||
|
||
void test_queue_index() { | ||
job_queue_node_type *node = job_queue_node_alloc( | ||
"name", "/tmp", "ls", 0, stringlist_alloc_new(), 1, NULL, NULL); | ||
test_assert_util_abort("job_queue_node_get_queue_index", | ||
call_get_queue_index, node); | ||
} | ||
|
||
void test_path_does_not_exist() { | ||
job_queue_node_type *node = | ||
job_queue_node_alloc("name", "does-not-exist", "ls", 0, | ||
stringlist_alloc_new(), 1, NULL, NULL); | ||
test_assert_NULL(node); | ||
assert(node == nullptr); | ||
} | ||
|
||
int main(int argc, char **argv) { | ||
util_install_signals(); | ||
test_create(); | ||
test_queue_index(); | ||
test_path_does_not_exist(); | ||
} |