Skip to content

Commit 3a67af5

Browse files
committed
Added main to three tests that didn't have it, to simplify regression testing
1 parent 699df9d commit 3a67af5

9 files changed

+53
-19
lines changed

regression-tests/mixed-parameter-passing-with-forward.cpp2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
#include <string>
33
#include <cstdlib>
4+
#include <ctime>
45

56
copy_from: (copy x:_) = { }
67

@@ -37,3 +38,5 @@ parameter_styles: (
3738
}
3839

3940
}
41+
42+
main: () -> int = { }

regression-tests/mixed-parameter-passing.cpp2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
#include <string>
33
#include <cstdlib>
4+
#include <ctime>
45

56
copy_from: (copy x:_) = { }
67

@@ -35,3 +36,5 @@ parameter_styles: (
3536
}
3637

3738
}
39+
40+
main: () -> int = { }
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11

2+
call: (v:_, w:_, x:_, y:_, z:_) = { }
3+
24
test: (a:_) -> std::string = {
35
return call( a,
4-
b(c)*++, "hello", /* polite
6+
a.b(a.c)*++, "hello", /* polite
57
greeting
68
goes here */ " there",
7-
d::e( f*.g()++, // because f is foobar
8-
h.i(),
9-
j(k,l) )
9+
a.d.e( a.f*.g()++, // because f is foobar
10+
a.h.i(),
11+
a.j(a.k,a.l) )
1012
);
1113
}
1214

15+
main: () -> int = { }

regression-tests/test-results/mixed-parameter-passing-with-forward.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@
55

66
#include <string>
77
#include <cstdlib>
8+
#include <ctime>
89

910
auto copy_from(auto x) -> void;
10-
#line 7 "mixed-parameter-passing-with-forward.cpp2"
11+
#line 8 "mixed-parameter-passing-with-forward.cpp2"
1112
auto parameter_styles(
1213
cpp2::in<std::string> a,
1314
std::string b,
1415
std::string& c,
1516
std::string&& d,
1617
auto&& e
1718
) -> void;
19+
#line 42 "mixed-parameter-passing-with-forward.cpp2"
20+
[[nodiscard]] auto main() -> int;
1821

1922
//=== Cpp2 definitions ==========================================================
2023

21-
#line 4 "mixed-parameter-passing-with-forward.cpp2"
24+
#line 5 "mixed-parameter-passing-with-forward.cpp2"
2225

2326
auto copy_from(auto x) -> void{}
2427

@@ -30,7 +33,7 @@ auto parameter_styles(
3033
auto&& e
3134
) -> void
3235
requires std::is_same_v<CPP2_TYPEOF(e), std::string>
33-
#line 14 "mixed-parameter-passing-with-forward.cpp2"
36+
#line 15 "mixed-parameter-passing-with-forward.cpp2"
3437
{
3538
int z { 12 };
3639

@@ -57,3 +60,5 @@ requires std::is_same_v<CPP2_TYPEOF(e), std::string>
5760
}
5861

5962
}
63+
64+
[[nodiscard]] auto main() -> int{}

regression-tests/test-results/mixed-parameter-passing-with-forward.cpp2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
#include <string>
33
#include <cstdlib>
4+
#include <ctime>
45

56
copy_from: (copy x:_) = { }
67

@@ -37,3 +38,5 @@ parameter_styles: (
3738
}
3839

3940
}
41+
42+
main: () -> int = { }

regression-tests/test-results/mixed-parameter-passing.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@
55

66
#include <string>
77
#include <cstdlib>
8+
#include <ctime>
89

910
auto copy_from(auto x) -> void;
10-
#line 7 "mixed-parameter-passing.cpp2"
11+
#line 8 "mixed-parameter-passing.cpp2"
1112
auto parameter_styles(
1213
cpp2::in<std::string> a,
1314
std::string b,
1415
std::string& c,
1516
std::string&& d
1617
) -> void;
18+
#line 40 "mixed-parameter-passing.cpp2"
19+
[[nodiscard]] auto main() -> int;
1720

1821
//=== Cpp2 definitions ==========================================================
1922

20-
#line 4 "mixed-parameter-passing.cpp2"
23+
#line 5 "mixed-parameter-passing.cpp2"
2124

2225
auto copy_from(auto x) -> void{}
2326

@@ -52,3 +55,5 @@ auto parameter_styles(
5255
}
5356

5457
}
58+
59+
[[nodiscard]] auto main() -> int{}

regression-tests/test-results/mixed-parameter-passing.cpp2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
#include <string>
33
#include <cstdlib>
4+
#include <ctime>
45

56
copy_from: (copy x:_) = { }
67

@@ -35,3 +36,5 @@ parameter_styles: (
3536
}
3637

3738
}
39+
40+
main: () -> int = { }

regression-tests/test-results/mixed-postfix-expression-custom-formatting.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@
33

44

55
#line 2 "mixed-postfix-expression-custom-formatting.cpp2"
6+
auto call(auto const& v, auto const& w, auto const& x, auto const& y, auto const& z) -> void;
7+
#line 4 "mixed-postfix-expression-custom-formatting.cpp2"
68
[[nodiscard]] auto test(auto const& a) -> std::string;
7-
#line 12 "mixed-postfix-expression-custom-formatting.cpp2"
8-
9+
#line 15 "mixed-postfix-expression-custom-formatting.cpp2"
10+
[[nodiscard]] auto main() -> int;
911

1012
//=== Cpp2 definitions ==========================================================
1113

1214
#line 1 "mixed-postfix-expression-custom-formatting.cpp2"
1315

16+
auto call(auto const& v, auto const& w, auto const& x, auto const& y, auto const& z) -> void{}
17+
1418
[[nodiscard]] auto test(auto const& a) -> std::string{
1519
return call( a,
16-
++*b(c), "hello", /* polite
20+
++*a.b(a.c), "hello", /* polite
1721
greeting
1822
goes here */ " there",
19-
d::e( ++(*f).g(), // because f is foobar
20-
CPP2_UFCS_0(i, h),
21-
j(k, l))
23+
a.d.e( ++(*a.f).g(), // because f is foobar
24+
a.h.i(),
25+
CPP2_UFCS(j, a, a.k, a.l))
2226
);
2327
}
28+
29+
[[nodiscard]] auto main() -> int{}
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11

2+
call: (v:_, w:_, x:_, y:_, z:_) = { }
3+
24
test: (a:_) -> std::string = {
35
return call( a,
4-
b(c)*++, "hello", /* polite
6+
a.b(a.c)*++, "hello", /* polite
57
greeting
68
goes here */ " there",
7-
d::e( f*.g()++, // because f is foobar
8-
h.i(),
9-
j(k,l) )
9+
a.d.e( a.f*.g()++, // because f is foobar
10+
a.h.i(),
11+
a.j(a.k,a.l) )
1012
);
1113
}
1214

15+
main: () -> int = { }

0 commit comments

Comments
 (0)