Skip to content

Commit

Permalink
Removed util abort test for altered function
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-el committed Sep 11, 2023
1 parent a781680 commit 91d5f16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/clib/old_tests/job_queue/test_job_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <ert/job_queue/job_list.hpp>
#include <ert/job_queue/job_node.hpp>
#include <ert/util/test_util.hpp>

void test_create() {
job_list_type *list = job_list_alloc();
Expand Down
18 changes: 2 additions & 16 deletions src/clib/old_tests/job_queue/test_job_node.cpp
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 =

Check warning on line 13 in src/clib/old_tests/job_queue/test_job_node.cpp

View workflow job for this annotation

GitHub Actions / annotate-cpp (ubuntu-latest)

Value stored to 'node' during its initialization is never read
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();
}

0 comments on commit 91d5f16

Please sign in to comment.