Skip to content

Commit 265cf9e

Browse files
committed
Revert "Fix signed/unsigned comparison"
Unfortunately using unsigned ints isn't a solution here, because we are creating negative numbers in this code which is UB then. This reverts commit 92b3ec5.
1 parent ed75dd8 commit 265cf9e

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

tests/test-output-flex-way-change.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ TEST_CASE("change way from t1")
4444

4545
options.append = true;
4646

47-
unsigned long num_t1 = 0;
48-
unsigned long num_t2 = 0;
47+
int num_t1 = 0;
48+
int num_t2 = 0;
4949
std::string update;
5050
SECTION("to t2")
5151
{
@@ -87,8 +87,8 @@ TEST_CASE("change way from t2")
8787

8888
options.append = true;
8989

90-
unsigned long num_t1 = 0;
91-
unsigned long num_t2 = 0;
90+
int num_t1 = 0;
91+
int num_t2 = 0;
9292
std::string update;
9393
SECTION("to t1")
9494
{
@@ -131,8 +131,8 @@ TEST_CASE("change way from t1 and t2")
131131

132132
options.append = true;
133133

134-
unsigned long num_t1 = 0;
135-
unsigned long num_t2 = 0;
134+
int num_t1 = 0;
135+
int num_t2 = 0;
136136
std::string update;
137137
SECTION("to t1")
138138
{

tests/test-output-flex-way-del.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ TEST_CASE("delete way: not a member")
3131

3232
testing::db::data_t data{tdata};
3333

34-
unsigned long num_t1 = 0;
35-
unsigned long num_tboth = 0;
34+
int num_t1 = 0;
35+
int num_tboth = 0;
3636
SECTION("in none") { data.add("w10 v1 dV Tt=ag Nn10,n11"); }
3737
SECTION("in t1")
3838
{
@@ -69,9 +69,9 @@ TEST_CASE("delete way: relation member")
6969

7070
testing::db::data_t data{tdata};
7171

72-
unsigned long num_t1 = 0;
73-
unsigned long num_t2 = 0;
74-
unsigned long num_tboth = 0;
72+
int num_t1 = 0;
73+
int num_t2 = 0;
74+
int num_tboth = 0;
7575

7676
SECTION("in none")
7777
{

0 commit comments

Comments
 (0)