kthohr / gcem
Showing 1 of 7 files from the diff.

@@ -0,0 +1,75 @@
Loading
1 +
/*################################################################################
2 +
  ##
3 +
  ##   Copyright (C) 2016-2022 Keith O'Hara
4 +
  ##
5 +
  ##   This file is part of the GCE-Math C++ library.
6 +
  ##
7 +
  ##   Licensed under the Apache License, Version 2.0 (the "License");
8 +
  ##   you may not use this file except in compliance with the License.
9 +
  ##   You may obtain a copy of the License at
10 +
  ##
11 +
  ##       http://www.apache.org/licenses/LICENSE-2.0
12 +
  ##
13 +
  ##   Unless required by applicable law or agreed to in writing, software
14 +
  ##   distributed under the License is distributed on an "AS IS" BASIS,
15 +
  ##   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 +
  ##   See the License for the specific language governing permissions and
17 +
  ##   limitations under the License.
18 +
  ##
19 +
  ################################################################################*/
20 +
21 +
#define TEST_PRINT_PRECISION_1 6
22 +
#define TEST_PRINT_PRECISION_2 18
23 +
24 +
#include "gcem_tests.hpp"
25 +
26 +
int main()
27 +
{
28 +
    print_begin("hypot");
29 +
30 +
    //
31 +
32 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      0.0L,           0.0L);
33 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,     -0.0L,           0.0L);
34 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      0.0L,          -0.0L);
35 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,     -0.0L,          -0.0L);
36 +
37 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      0.2L,           0.0L);
38 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,     -0.2L,           0.0L);
39 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      0.001L,         0.001L);
40 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      0.49L,          0.49L);
41 +
42 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,     -0.5L,          -0.5L);
43 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      0.5L,          -0.5L);
44 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,     -0.5L,           0.5L);
45 +
46 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      9.6L,           8.4L);
47 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      1.0L,           0.0L);
48 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      0.0L,           1.0L);
49 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,     -1.0L,           0.0L);
50 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      0.0L,          -1.0L);
51 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      1.0L,           3.0L);
52 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,     -5.0L,           2.5L);
53 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,  -1000.0L,          -0.001L);
54 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,      0.1337L,  -123456.0L);
55 +
56 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot, TEST_POSINF,        2.0L);
57 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,        2.0L, TEST_POSINF);
58 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot, TEST_POSINF, TEST_POSINF);
59 +
60 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot, TEST_NEGINF,        2.0L);
61 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,        2.0L, TEST_NEGINF);
62 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot, TEST_NEGINF, TEST_NEGINF);
63 +
64 +
    //
65 +
66 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot, TEST_NAN,     1.0L);
67 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot,     1.0L, TEST_NAN);
68 +
    GCEM_TEST_COMPARE_VALS(gcem::hypot,std::hypot, TEST_NAN, TEST_NAN);
69 +
70 +
    //
71 +
72 +
    print_final("hypot");
73 +
74 +
    return 0;
75 +
}
Files Coverage
include/gcem_incl 78.13%
tests 95.85%
Project Totals (70 files) 85.29%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading