R Under development (unstable) (2023-12-08 r85664 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > #### doRUnit.R --- Run RUnit tests > ####------------------------------------------------------------------------ > > ### Origianlly follows Gregor Gojanc's example in CRAN package 'gdata' > ### and the corresponding section in the R Wiki: > ### http://wiki.r-project.org/rwiki/doku.php?id=developers:runit > > ### MM: Vastly changed: This should also be "runnable" for *installed* > ## package which has no ./tests/ > ## ----> put the bulk of the code e.g. in ../inst/unitTests/runTests.R : > > if(require("RUnit", quietly = TRUE)) { + + ## --- Setup --- + + wd <- getwd() + pkg <- sub("\\.Rcheck$", '', basename(dirname(wd))) + + library(package=pkg, character.only=TRUE) + + path <- system.file("unitTests", package = pkg) + + stopifnot(file.exists(path), file.info(path.expand(path))$isdir) + + source(file.path(path, "runTests.R"), echo = TRUE) + } > pkg <- "cccp" > if (require("RUnit", quietly = TRUE)) { + library(package = pkg, character.only = TRUE) + if (!(exists("path") && file.exists(path))) + .... [TRUNCATED] Executing test function test.ACNT ... Iteration: 0 pobj: 0 dobj: 4.15888 pinf: 1 dinf: 1 dgap: 1 Iteration: 1 pobj: 3.63485 dobj: 3.98945 pinf: 0.0784281 dinf: 0.153256 dgap: 0.05 Iteration: 2 pobj: 3.97088 dobj: 3.98898 pinf: 0.00399431 dinf: 0.00805997 dgap: 0.0025 Iteration: 3 pobj: 3.98808 dobj: 3.98898 pinf: 0.000199363 dinf: 0.000402677 dgap: 0.000125 Iteration: 4 pobj: 3.98894 dobj: 3.98898 pinf: 9.94478e-06 dinf: 2.00875e-05 dgap: 6.25e-06 Iteration: 5 pobj: 3.98898 dobj: 3.98898 pinf: 4.96058e-07 dinf: 1.00204e-06 dgap: 3.125e-07 Iteration: 6 pobj: 3.98898 dobj: 3.98898 pinf: 2.4744e-08 dinf: 4.99812e-08 dgap: 1.5625e-08 Optimal solution found. done successfully. Executing test function test.FPLN ... Iteration: 0 pobj: 2 dobj: 484 pinf: 1 dinf: 1 dgap: 31 Iteration: 1 pobj: 7.52875 dobj: 500.331 pinf: 0.820914 dinf: 0.818229 dgap: 20.6066 Iteration: 2 pobj: 12.7142 dobj: 480.753 pinf: 0.72242 dinf: 0.724262 dgap: 18.756 Iteration: 3 pobj: 17.9303 dobj: 457.4 pinf: 0.633201 dinf: 0.639389 dgap: 17.4562 Iteration: 4 pobj: 28.6262 dobj: 409.267 pinf: 0.484079 dinf: 0.50459 dgap: 13.1788 Iteration: 5 pobj: 39.6102 dobj: 341.542 pinf: 0.351773 dinf: 0.38508 dgap: 10.5518 Iteration: 6 pobj: 57.4401 dobj: 220.096 pinf: 0.18063 dinf: 0.238911 dgap: 4.24126 Iteration: 7 pobj: 74.4838 dobj: 112.433 pinf: 0.0587681 dinf: 0.107418 dgap: 1.24678 Iteration: 8 pobj: 79.0327 dobj: 92.7381 pinf: 0.0306469 dinf: 0.058088 dgap: 0.683339 Iteration: 9 pobj: 79.1 dobj: 91.7162 pinf: 0.0290604 dinf: 0.0550841 dgap: 0.670775 Iteration: 10 pobj: 78.0731 dobj: 89.5205 pinf: 0.027121 dinf: 0.0512968 dgap: 0.665484 Iteration: 11 pobj: 67.1422 dobj: 73.6299 pinf: 0.0191757 dinf: 0.0219574 dgap: 0.664325 Iteration: 12 pobj: 66.0088 dobj: 71.7939 pinf: 0.0173435 dinf: 0.0196792 dgap: 0.633348 Iteration: 13 pobj: 58.8695 dobj: 63.5055 pinf: 0.0142055 dinf: 0.0120968 dgap: 0.672105 Iteration: 14 pobj: 54.3761 dobj: 58.141 pinf: 0.0110511 dinf: 0.00762283 dgap: 0.324308 Iteration: 15 pobj: 49.7041 dobj: 52.8215 pinf: 0.0088829 dinf: 0.00421045 dgap: 0.134789 Iteration: 16 pobj: 48.6977 dobj: 51.3048 pinf: 0.00746282 dinf: 0.00343044 dgap: 0.113148 Iteration: 17 pobj: 48.4907 dobj: 50.8685 pinf: 0.00690046 dinf: 0.00316319 dgap: 0.108672 Iteration: 18 pobj: 48.2794 dobj: 50.2977 pinf: 0.00602745 dinf: 0.00274049 dgap: 0.104218 Iteration: 19 pobj: 47.6988 dobj: 49.0593 pinf: 0.00434138 dinf: 0.00180606 dgap: 0.0809137 Iteration: 20 pobj: 47.5198 dobj: 48.6869 pinf: 0.00379008 dinf: 0.00155678 dgap: 0.0727606 Iteration: 21 pobj: 47.5405 dobj: 48.6473 pinf: 0.00362123 dinf: 0.00148743 dgap: 0.0716652 Iteration: 22 pobj: 47.5741 dobj: 48.6034 pinf: 0.00339705 dinf: 0.00139544 dgap: 0.0700571 Iteration: 23 pobj: 47.4834 dobj: 48.1284 pinf: 0.00216341 dinf: 0.000806632 dgap: 0.0656825 Iteration: 24 pobj: 47.5664 dobj: 47.8997 pinf: 0.00118515 dinf: 0.000358908 dgap: 0.0315211 Iteration: 25 pobj: 47.7313 dobj: 47.848 pinf: 0.00044517 dinf: 0.000110374 dgap: 0.0086668 Iteration: 26 pobj: 47.8271 dobj: 47.8442 pinf: 6.93667e-05 dinf: 1.45866e-05 dgap: 0.000962958 Iteration: 27 pobj: 47.8434 dobj: 47.8444 pinf: 4.22372e-06 dinf: 8.54455e-07 dgap: 5.35082e-05 Iteration: 28 pobj: 47.8444 dobj: 47.8444 pinf: 2.12393e-07 dinf: 4.28644e-08 dgap: 2.68088e-06 Optimal solution found. done successfully. Executing test function test.GP ... Iteration: 0 pobj: 0 dobj: 4.55489 pinf: 1 dinf: 1 dgap: 2 Iteration: 1 pobj: 1.72086 dobj: 3.36506 pinf: 0.409444 dinf: 0.565365 dgap: 0.314093 Iteration: 2 pobj: 1.86517 dobj: 2.79519 pinf: 0.202931 dinf: 0.0551876 dgap: 0.0338198 Iteration: 3 pobj: 2.73346 dobj: 2.78545 pinf: 0.0117224 dinf: 0.00519079 dgap: 0.00336509 Iteration: 4 pobj: 2.78272 dobj: 2.78537 pinf: 0.000602533 dinf: 0.00028834 dgap: 0.000196451 Iteration: 5 pobj: 2.78524 dobj: 2.78537 pinf: 3.00246e-05 dinf: 1.4432e-05 dgap: 9.89267e-06 Iteration: 6 pobj: 2.78536 dobj: 2.78537 pinf: 1.49807e-06 dinf: 7.20241e-07 dgap: 4.94969e-07 Iteration: 7 pobj: 2.78537 dobj: 2.78537 pinf: 7.47872e-08 dinf: 3.59566e-08 dgap: 2.47693e-08 Optimal solution found. done successfully. Executing test function test.LPCC ... Iteration: 0 pobj: 1.146 dobj: -220.576 pinf: 0.862592 dinf: 7.58338 dgap: 435.5 k/t : 1 Iteration: 1 pobj: 3.26421 dobj: -77.3552 pinf: 0.321883 dinf: 2.8298 dgap: 124.672 k/t : 2.49091 Iteration: 2 pobj: -1.89655 dobj: -42.9446 pinf: 0.177601 dinf: 1.56136 dgap: 63.9719 k/t : 4.80867 Iteration: 3 pobj: -5.92648 dobj: -17.8727 pinf: 0.0530067 dinf: 0.466002 dgap: 18.4573 k/t : 1.74013 Iteration: 4 pobj: -8.56062 dobj: -12.1481 pinf: 0.0170204 dinf: 0.149633 dgap: 6.65122 k/t : 0.807159 Iteration: 5 pobj: -10.7699 dobj: -11.113 pinf: 0.00163787 dinf: 0.0143991 dgap: 0.669713 k/t : 0.0797518 Iteration: 6 pobj: -10.9398 dobj: -10.966 pinf: 0.00012506 dinf: 0.00109945 dgap: 0.0512257 k/t : 0.00609477 Iteration: 7 pobj: -10.9481 dobj: -10.9501 pinf: 9.66532e-06 dinf: 8.49716e-05 dgap: 0.00395893 k/t : 0.000471706 Iteration: 8 pobj: -10.9485 dobj: -10.9487 pinf: 6.42384e-07 dinf: 5.64746e-06 dgap: 0.000263112 k/t : 3.13698e-05 Iteration: 9 pobj: -10.9485 dobj: -10.9486 pinf: 3.71323e-08 dinf: 3.2653e-07 dgap: 1.52101e-05 k/t : 1.81357e-06 Iteration: 10 pobj: -10.9485 dobj: -10.9485 pinf: 2.02725e-09 dinf: 2.03041e-08 dgap: 8.25834e-07 k/t : 9.84696e-08 Optimal solution found. done successfully. Executing test function test.LPIC ... Iteration: 0 pobj: -8.1 dobj: -18.3 pinf: 0 dinf: 0.750934 dgap: 4.08 k/t : 1 Iteration: 1 pobj: -8.77997 dobj: -9.75888 pinf: 1.33937e-16 dinf: 0.0700218 dgap: 0.362859 k/t : 0.0654471 Iteration: 2 pobj: -8.98915 dobj: -9.03804 pinf: 9.0932e-17 dinf: 0.00349274 dgap: 0.0172986 k/t : 0.0032113 Iteration: 3 pobj: -8.99946 dobj: -9.0019 pinf: 3.98137e-16 dinf: 0.000174293 dgap: 0.000861117 k/t : 0.000160241 Iteration: 4 pobj: -8.99997 dobj: -9.00009 pinf: 4.53673e-17 dinf: 8.71375e-06 dgap: 4.30461e-05 k/t : 8.01122e-06 Iteration: 5 pobj: -9 dobj: -9 pinf: 5.15271e-16 dinf: 4.35685e-07 dgap: 2.15228e-06 k/t : 4.00559e-07 Optimal solution found. Iteration: 0 pobj: 2.64706 dobj: -0.705882 pinf: 0.795853 dinf: 1.58059 dgap: 16.1315 k/t : 1 Iteration: 1 pobj: 3.05945 dobj: 2.74036 pinf: 0.118925 dinf: 0.236189 dgap: 1.50009 k/t : 0.331372 Iteration: 2 pobj: 2.52445 dobj: 2.50647 pinf: 0.0144341 dinf: 0.0286666 dgap: 0.185933 k/t : 0.0609647 Iteration: 3 pobj: 2.50123 dobj: 2.50033 pinf: 0.000723486 dinf: 0.00143687 dgap: 0.00929074 k/t : 0.00306307 Iteration: 4 pobj: 2.50006 dobj: 2.50002 pinf: 3.61715e-05 dinf: 7.18377e-05 dgap: 0.000464444 k/t : 0.000153143 Iteration: 5 pobj: 2.5 dobj: 2.5 pinf: 1.80857e-06 dinf: 3.59187e-06 dgap: 2.3222e-05 k/t : 7.65709e-06 Iteration: 6 pobj: 2.5 dobj: 2.5 pinf: 9.04282e-08 dinf: 1.79594e-07 dgap: 1.1611e-06 k/t : 3.82854e-07 Optimal solution found. done successfully. Executing test function test.QPEC ... done successfully. Executing test function test.QPIC ... Iteration: 0 pobj: 1.88889 dobj: 0.777778 pinf: 0 dinf: 1.66667 dgap: 1.11111 Iteration: 1 pobj: 1.88034 dobj: 1.76798 pinf: 5.55112e-17 dinf: 0.162283 dgap: 0.112356 Iteration: 2 pobj: 1.87539 dobj: 1.85812 pinf: 2.22045e-16 dinf: 0.0165369 dgap: 0.0172735 Iteration: 3 pobj: 1.87501 dobj: 1.87325 pinf: 1.24127e-16 dinf: 0.00109146 dgap: 0.0017552 Iteration: 4 pobj: 1.875 dobj: 1.8749 pinf: 2.22045e-16 dinf: 5.67924e-05 dgap: 0.000100637 Iteration: 5 pobj: 1.875 dobj: 1.87499 pinf: 4.44089e-16 dinf: 2.8464e-06 dgap: 5.07597e-06 Iteration: 6 pobj: 1.875 dobj: 1.875 pinf: 8.88178e-16 dinf: 1.42337e-07 dgap: 2.53911e-07 Optimal solution found. done successfully. Executing test function test.QPIC ... Iteration: 0 pobj: -1.07214 dobj: -4.30401 pinf: 0 dinf: 1.52682 dgap: 3.23187 Iteration: 1 pobj: -1.15524 dobj: -1.58268 pinf: 9.44233e-16 dinf: 0.313704 dgap: 0.427437 Iteration: 2 pobj: -1.29597 dobj: -1.48308 pinf: 1.04041e-15 dinf: 0.161694 dgap: 0.18711 Iteration: 3 pobj: -1.41617 dobj: -1.44967 pinf: 1.74758e-15 dinf: 0.048994 dgap: 0.0335091 Iteration: 4 pobj: -1.42932 dobj: -1.4346 pinf: 5.96686e-15 dinf: 0.010581 dgap: 0.00528554 Iteration: 5 pobj: -1.42996 dobj: -1.43045 pinf: 2.42297e-14 dinf: 0.00104804 dgap: 0.000491883 Iteration: 6 pobj: -1.42999 dobj: -1.43002 pinf: 8.03434e-14 dinf: 6.18183e-05 dgap: 2.89028e-05 Iteration: 7 pobj: -1.42999 dobj: -1.42999 pinf: 4.96387e-13 dinf: 3.54173e-06 dgap: 1.67132e-06 Iteration: 8 pobj: -1.42999 dobj: -1.42999 pinf: 1.39325e-12 dinf: 2.38076e-07 dgap: 1.14978e-07 Optimal solution found. done successfully. Executing test function test.SDP ... Iteration: 0 pobj: -1.20375 dobj: -185.393 pinf: 1.62451e-17 dinf: 8.40165 dgap: 180.771 k/t : 1 Iteration: 1 pobj: -1.29013 dobj: -14.0365 pinf: 1.60925e-15 dinf: 0.581329 dgap: 12.4536 k/t : 0.0672191 Iteration: 2 pobj: -2.1706 dobj: -4.40389 pinf: 1.86115e-15 dinf: 0.102552 dgap: 2.07578 k/t : 0.0271544 Iteration: 3 pobj: -2.88468 dobj: -3.39214 pinf: 9.62407e-16 dinf: 0.0237289 dgap: 0.446928 k/t : 0.0155691 Iteration: 4 pobj: -3.1311 dobj: -3.18659 pinf: 2.0808e-15 dinf: 0.00261392 dgap: 0.0478319 k/t : 0.00212702 Iteration: 5 pobj: -3.15185 dobj: -3.15681 pinf: 2.36968e-15 dinf: 0.000235324 dgap: 0.00426453 k/t : 0.000226003 Iteration: 6 pobj: -3.15343 dobj: -3.15384 pinf: 2.51712e-15 dinf: 1.95541e-05 dgap: 0.000353797 k/t : 1.92915e-05 Iteration: 7 pobj: -3.15354 dobj: -3.15357 pinf: 7.31768e-14 dinf: 1.29515e-06 dgap: 2.34251e-05 k/t : 1.28572e-06 Iteration: 8 pobj: -3.15354 dobj: -3.15355 pinf: 1.51088e-13 dinf: 8.72609e-08 dgap: 1.57809e-06 k/t : 8.6786e-08 Optimal solution found. done successfully. Executing test function test.SOCP ... Iteration: 0 pobj: 4.99693 dobj: -17.2849 pinf: 0.322805 dinf: 4.28813 dgap: 56.9196 k/t : 1 Iteration: 1 pobj: -1.41092 dobj: -7.44741 pinf: 0.0917204 dinf: 1.21841 dgap: 14.9287 k/t : 0.578693 Iteration: 2 pobj: -58.927 dobj: -94.58 pinf: 0.695769 dinf: 9.24258 dgap: 1003.28 k/t : 14.5282 Iteration: 3 pobj: -33.9103 dobj: -24.3038 pinf: 0.0509407 dinf: 0.676696 dgap: 20.5594 k/t : 13.2805 Iteration: 4 pobj: -37.8931 dobj: -37.5477 pinf: 0.00508365 dinf: 0.0675311 dgap: 2.87714 k/t : 0.711996 Iteration: 5 pobj: -38.2879 dobj: -38.2699 pinf: 0.000341215 dinf: 0.0045327 dgap: 0.195438 k/t : 0.0425653 Iteration: 6 pobj: -38.3364 dobj: -38.3347 pinf: 3.56141e-05 dinf: 0.000473097 dgap: 0.0203277 k/t : 0.00430596 Iteration: 7 pobj: -38.3452 dobj: -38.3451 pinf: 3.4406e-06 dinf: 4.57049e-05 dgap: 0.00195714 k/t : 0.000413291 Iteration: 8 pobj: -38.3463 dobj: -38.3463 pinf: 2.67511e-07 dinf: 3.55365e-06 dgap: 0.000152043 k/t : 3.2077e-05 Iteration: 9 pobj: -38.3464 dobj: -38.3464 pinf: 1.60129e-08 dinf: 2.13383e-07 dgap: 9.07221e-06 k/t : 1.91343e-06 Optimal solution found. done successfully. RUNIT TEST PROTOCOL -- Sat Dec 9 18:32:43 2023 *********************************************** Number of test functions: 10 Number of errors: 0 Number of failures: 0 1 Test Suite : cccp unit testing - 10 test functions, 0 errors, 0 failures There were 20 warnings (use warnings() to see them) > > proc.time() user system elapsed 2.92 0.14 3.04