From ae270af000aefaee6326d4d8cba9fbf761768709 Mon Sep 17 00:00:00 2001 From: Paul Goulart Date: Thu, 26 Jul 2018 22:14:18 +0100 Subject: [PATCH 1/2] unused unit test variables --- tests/test_rank_deficient.h | 3 +-- tests/test_sym_structure.h | 3 +-- tests/test_tril_structure.h | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/test_rank_deficient.h b/tests/test_rank_deficient.h index 08f9b76..5506629 100644 --- a/tests/test_rank_deficient.h +++ b/tests/test_rank_deficient.h @@ -6,9 +6,8 @@ static char* test_rank_deficient() QDLDL_float Ax[] = {1.0, 1.0, 1.0}; QDLDL_int An = 2; - // RHS and solution to Ax = b (should be impossible) + // RHS for Ax = b (should fail to solve) QDLDL_float b[] = {1,1}; - QDLDL_float xsol[] = {1,1}; //x replaces b during solve int status = ldl_factor_solve(An,Ap,Ai,Ax,b); diff --git a/tests/test_sym_structure.h b/tests/test_sym_structure.h index fe0e64e..52faf01 100644 --- a/tests/test_sym_structure.h +++ b/tests/test_sym_structure.h @@ -6,9 +6,8 @@ static char* test_sym_structure() QDLDL_float Ax[] = {5.0,1.0,1.0,5.0}; QDLDL_int An = 2; - // RHS and solution to Ax = b (should be impossible) + // RHS for Ax = b QDLDL_float b[] = {1,1}; - QDLDL_float xsol[] = {1,1}; //x replaces b during solve int status = ldl_factor_solve(An,Ap,Ai,Ax,b); diff --git a/tests/test_tril_structure.h b/tests/test_tril_structure.h index b2a7675..79a189c 100644 --- a/tests/test_tril_structure.h +++ b/tests/test_tril_structure.h @@ -6,9 +6,8 @@ static char* test_tril_structure() QDLDL_float Ax[] = {5.0,1.0,5.0}; QDLDL_int An = 2; - // RHS and solution to Ax = b (should be impossible) + // RHS for Ax = b QDLDL_float b[] = {1,1}; - QDLDL_float xsol[] = {1,1}; //x replaces b during solve int status = ldl_factor_solve(An,Ap,Ai,Ax,b); From 22475075a772da0b921eb602a346e8c5f370baac Mon Sep 17 00:00:00 2001 From: Paul Goulart Date: Thu, 26 Jul 2018 22:38:44 +0100 Subject: [PATCH 2/2] unit test build info --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5f8f8ae..a25abc1 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ This will generate an `out/` folder with contents: - `qdldl_example`: a **code example** from [`examples/c/example.c`](./examples/c/example.c) - `libqdldl`: a static and a dynamic versions of the library. +You can include an addition option `-DUNITTESTS=ON` when calling `cmake`, which will result in an additional executable `qdldl_tester` being built in the `out/` folder to test QDLDL on a variety of problems, including those with rank deficient or otherwise ill-formatted inputs. + **N.B.** All files will have file extensions appropriate to your operating system.