• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

polserver / polserver / 25918451630

15 May 2026 12:43PM UTC coverage: 60.929% (+2.1%) from 58.859%
25918451630

push

github

turleypol
added dynamic property which returns a pointer of the object instead of
a copy like the current imp.
needed to be able to eg store a vector

43 of 61 new or added lines in 2 files covered. (70.49%)

14455 existing lines in 345 files now uncovered.

44695 of 73356 relevant lines covered (60.93%)

449621.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pol-core/pol/testing/testskill.cpp
1
/** @file
2
 *
3
 * I doubt the usefullness..
4
 * raw_to_base looses information
5
 * @par History
6
 */
7

8

9
#include "testenv.h"
10

11
#include "../../clib/logfacility.h"
12
#include "../skilladv.h"
13

14

15
namespace Pol::Testing
16
{
17
namespace
18
{
UNCOV
19
void test_skilladv( unsigned int raw, unsigned short base )
×
20
{
UNCOV
21
  INFO_PRINT( "Raw {}, base {}: ", raw, base );
×
22
  if ( Core::raw_to_base( raw ) != base )
×
23
  {
UNCOV
24
    INFO_PRINTLN( "raw_to_base failed!" );
×
25
    UnitTest::inc_failures();
×
26
  }
UNCOV
27
  if ( Core::base_to_raw( base ) != raw )
×
28
  {
UNCOV
29
    INFO_PRINTLN( "base_to_raw failed!" );
×
30
    UnitTest::inc_failures();
×
31
  }
UNCOV
32
  INFO_PRINTLN( "Passed" );
×
33
  UnitTest::inc_successes();
×
34
}
×
35
}  // namespace
36

UNCOV
37
void skilladv_test()
×
38
{
UNCOV
39
  INFO_PRINTLN( "Skill advancement tests:" );
×
40
  test_skilladv( 20, 1 );
×
41
  test_skilladv( 512, 25 );
×
42
  test_skilladv( 1024, 50 );
×
43
  test_skilladv( 2048, 100 );
×
44
  test_skilladv( 3072, 150 );
×
45
  test_skilladv( 4096, 200 );
×
46
  test_skilladv( 5120, 225 );
×
47
  test_skilladv( 6144, 250 );
×
48
  test_skilladv( 7168, 275 );
×
49
  test_skilladv( 8192, 300 );
×
50
  test_skilladv( 16384, 400 );
×
51
  test_skilladv( 32768, 500 );
×
52
  test_skilladv( 65536, 600 );
×
53
  test_skilladv( 131072, 700 );
×
54
  test_skilladv( 262144, 800 );
×
55
  test_skilladv( 524288, 900 );
×
56
  test_skilladv( 1048576, 1000 );
×
57
  test_skilladv( 2097152, 1100 );
×
58
  test_skilladv( 4194304, 1200 );
×
59
  test_skilladv( 8388608, 1300 );
×
60
  test_skilladv( 16777216, 1400 );
×
61
  test_skilladv( 33554432, 1500 );
×
62
  test_skilladv( 67108864, 1600 );
×
63
  test_skilladv( 134217728, 1700 );
×
64
  test_skilladv( 268435456, 1800 );
×
65
  test_skilladv( 536870912, 1900 );
×
66

UNCOV
67
  for ( unsigned short base = 0; base < 2000; ++base )
×
68
  {
UNCOV
69
    INFO_PRINT( "Base {}: Raw=", base );
×
70
    unsigned int raw = Core::base_to_raw( base );
×
71
    INFO_PRINT( "{}: ", raw );
×
72
    unsigned short calcbase = Core::raw_to_base( raw );
×
73
    if ( calcbase != base )
×
74
    {
UNCOV
75
      INFO_PRINTLN( "Failed ({})", calcbase );
×
76
      UnitTest::inc_failures();
×
77
    }
78
    else
79
    {
UNCOV
80
      INFO_PRINTLN( "Passed" );
×
81
      UnitTest::inc_successes();
×
82
    }
83
  }
84

UNCOV
85
  for ( unsigned int raw = 0; raw < 2500; ++raw )
×
86
  {
UNCOV
87
    INFO_PRINT( "Raw {}: Base=", raw );
×
88
    unsigned short base = Core::raw_to_base( raw );
×
89
    INFO_PRINT( "{}: ", base );
×
90
    unsigned int calcraw = Core::base_to_raw( base );
×
91
    if ( calcraw != raw )
×
92
    {
UNCOV
93
      INFO_PRINTLN( "Failed ({})", calcraw );
×
94
      UnitTest::inc_failures();
×
95
    }
96
    else
97
    {
UNCOV
98
      INFO_PRINTLN( "Passed" );
×
99
      UnitTest::inc_successes();
×
100
    }
101
  }
UNCOV
102
}
×
103

104
}  // namespace Pol::Testing
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc