Skip to content

Commit 30a7e23

Browse files
committed
Added regression test .cpp compilation + execution results capture for clang++-12
1 parent 9fc97a5 commit 30a7e23

File tree

85 files changed

+204
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+204
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Ubuntu clang version 12.0.0-3ubuntu1~20.04.5
2+
Target: x86_64-pc-linux-gnu
3+
Thread model: posix
4+
InstalledDir: /usr/bin
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello world

regression-tests/test-results/clang-12/mixed-allcpp1-hello.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Bounds safety violation: out of bounds access attempt detected
2+
terminate called without an active exception

regression-tests/test-results/clang-12/mixed-bounds-check.cpp.output

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
1
2+
44
3+
45
4+
46
5+
5

regression-tests/test-results/clang-12/mixed-bounds-safety-with-assert-2.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Bounds safety violation
2+
terminate called without an active exception

regression-tests/test-results/clang-12/mixed-bounds-safety-with-assert.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hello
2+
2022
3+
hello-ish
4+
2022-ish

regression-tests/test-results/clang-12/mixed-captures-in-expressions-and-postconditions.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hello-ish maybe
2+
2022-ish maybe

regression-tests/test-results/clang-12/mixed-function-expression-and-std-for-each.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hello
2+
2022
3+
hello-ish
4+
2022-ish

regression-tests/test-results/clang-12/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hello
2+
2022
3+
hello-ish
4+
2022-ish

regression-tests/test-results/clang-12/mixed-function-expression-and-std-ranges-for-each.cpp.output

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
hello
3+
4+
2023
5+
hello-ish
6+
2023-ish

regression-tests/test-results/clang-12/mixed-function-expression-with-pointer-capture.cpp.output

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
hello
3+
4+
2022
5+
hello-ish
6+
2022-ish

regression-tests/test-results/clang-12/mixed-function-expression-with-repeated-capture.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello [world]

regression-tests/test-results/clang-12/mixed-hello.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Contract violation: fill: value must contain at least count elements
2+
terminate called without an active exception

regression-tests/test-results/clang-12/mixed-initialization-safety-3-contract-violation.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
>> [xyzzy]

regression-tests/test-results/clang-12/mixed-initialization-safety-3.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-12/mixed-inspect-with-typeof-of-template-arg-list.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-12/mixed-inspect-with-typeof-of-template-arg-list.cpp.output

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
>> hello
2+
>> big
3+
>> world
4+
** ** **
5+
>> [hello]
6+
>> [big]
7+
>> [world]

regression-tests/test-results/clang-12/mixed-intro-example-three-loops.cpp.output

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
1 42
2+
2 84
3+
3 168
4+
4 336
5+
5 672

regression-tests/test-results/clang-12/mixed-intro-for-with-counter-include-last.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sending error to my framework... [dynamic null dereference attempt detected]

regression-tests/test-results/clang-12/mixed-lifetime-safety-and-null-contracts.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
>> 42

regression-tests/test-results/clang-12/mixed-lifetime-safety-pointer-init-4.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
a is 10
2+
b is xyzzy

regression-tests/test-results/clang-12/mixed-multiple-return-values.cpp.output

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
enter main
2+
enter f00
3+
enter f01
4+
+X 1
5+
exit f01
6+
-X 1
7+
exit f00
8+
9+
enter f10
10+
enter f11
11+
enter f12
12+
enter f13
13+
enter f14
14+
+X 2
15+
exit f14
16+
exit f13
17+
exit f12
18+
-X 2
19+
exit f11
20+
exit f10
21+
exit main

regression-tests/test-results/clang-12/mixed-out-destruction.cpp.output

Whitespace-only changes.

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

Whitespace-only changes.

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

Whitespace-only changes.

regression-tests/test-results/clang-12/mixed-parameter-passing.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-12/mixed-parameter-passing.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-12/mixed-postexpression-with-capture.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-12/mixed-postexpression-with-capture.cpp.output

Whitespace-only changes.

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

Whitespace-only changes.

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

Whitespace-only changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
a = 2, b = (empty)
2+
a^2 + b = 46
3+
sv = my string_view
4+
osv = (empty)
5+
osv = string literal bound to optional string_view
6+
var = (empty)
7+
var = abracadabra
8+
var = 2.718280
9+
mypair = (12, 3.400000)
10+
tup1 = (12)
11+
tup2 = (12, 3.400000)
12+
tup3 = (12, 3.400000, 456)
13+
p = (first, (empty))
14+
t = (3.140000, (empty), (empty))
15+
vv = 0
16+
vv = (1, 2.300000)
17+
custom = (customize me - no cpp2::to_string overload exists for this type)

regression-tests/test-results/clang-12/mixed-string-interpolation.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12

regression-tests/test-results/clang-12/mixed-test-parens.cpp.output

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
1.1 is int? false
2+
1 is int? true
3+
4+
s* is Shape? true
5+
s* is Circle? true
6+
s* is Square? false

regression-tests/test-results/clang-12/mixed-type-safety-1.cpp.output

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
>> decorated
2+
>> hello
3+
>> world

regression-tests/test-results/clang-12/pure2-bounds-safety-span.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-12/pure2-bugfix-for-name-lookup-and-value-decoration.cpp.execution

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pure2-bugfix-for-name-lookup-and-value-decoration.cpp2:8:7: warning: expression result unused [-Wunused-value]
2+
v.i;
3+
~ ^
4+
1 warning generated.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello [world]

regression-tests/test-results/clang-12/pure2-hello.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
d value is not an int or string
2+
St7variantIJidEE value is not an int or string
3+
St3any value is "xyzzy"
4+
St8optionalIiE value is not an int or string
5+
i value is integer 42
6+
St7variantIJidEE value is integer 1
7+
St3any value is integer 2
8+
St8optionalIiE value is integer 3

regression-tests/test-results/clang-12/pure2-inspect-expression-in-generic-function-multiple-types.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
A7_c value is not an int
2+
i value is 1
3+
d value is not an int

regression-tests/test-results/clang-12/pure2-inspect-expression-with-as-in-generic-function.cpp.output

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
All these cases satisfy "matches std::string"
3+
4+
St7variantIJiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE
5+
... matches std::string
6+
7+
St3any
8+
... matches std::string
9+
10+
St8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE
11+
... matches std::string

regression-tests/test-results/clang-12/pure2-inspect-fallback-with-variant-any-optional.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
All these cases satisfy "VOYDE AND EMPTIE"
3+
4+
St10unique_ptrIiSt14default_deleteIiEE
5+
... VOYDE AND EMPTIE
6+
7+
N9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEE
8+
... VOYDE AND EMPTIE
9+
10+
St7variantIJSt9monostateiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE
11+
... VOYDE AND EMPTIE
12+
13+
St3any
14+
... VOYDE AND EMPTIE
15+
16+
St8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE
17+
... VOYDE AND EMPTIE

regression-tests/test-results/clang-12/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
>> [hello] - length 7
2+
>> [2022] - length 6

regression-tests/test-results/clang-12/pure2-intro-example-hello-2022.cpp.output

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
>> hello
2+
>> big
3+
>> world
4+
** ** **
5+
>> [hello]
6+
>> [big]
7+
>> [world]

regression-tests/test-results/clang-12/pure2-intro-example-three-loops.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
84

regression-tests/test-results/clang-12/pure2-look-up-parameter-across-unnamed-function.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-12/pure2-stdio-with-raii.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-12/pure2-stdio-with-raii.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-12/pure2-stdio.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-12/pure2-stdio.cpp.output

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
d is int? false
2+
St7variantIJidEE is int? false
3+
St3any is int? false
4+
St8optionalIiE is int? false
5+
6+
i is int? true
7+
St7variantIJidEE is int? true
8+
St3any is int? true
9+
St8optionalIiE is int? true

regression-tests/test-results/clang-12/pure2-type-safety-1.cpp.output

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
d value is not an int
2+
St7variantIJidEE value is not an int
3+
St3any value is not an int
4+
St8optionalIiE value is not an int
5+
i value is 42
6+
St7variantIJidEE value is 1
7+
St3any value is 2
8+
St8optionalIiE value is 3

regression-tests/test-results/clang-12/pure2-type-safety-2-with-inspect-expression.cpp.output

Whitespace-only changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This is intended to be run in the /test-results/clang-12 subdirectory
2+
# in a Linux shell with clang++-12 installed
3+
#
4+
cp ../*.cpp .
5+
rm -f *.output
6+
count=0
7+
exe_count=0
8+
clang++-12 --version > clang-version.output 2>&1
9+
for f in *.cpp
10+
do
11+
printf "Starting clang++-12 %s\n" "$f"
12+
clang++-12 -I/mnt/c/GitHub/cppfront/include -std=c++20 -pthread -o test.exe $f > $f.output 2>&1
13+
rm -f $f
14+
let count=count+1
15+
if test -f "test.exe"; then
16+
let exe_count=exe_count+1
17+
printf " Starting executable\n"
18+
./test.exe > $f.execution 2>&1
19+
rm -f test.exe
20+
fi
21+
done
22+
rm -f *.obj *.exp *.lib
23+
printf "\nDone: %s .cpp tests compiled\n" "$count"
24+
printf "\n %s .cpp executables generated and run\n" "$exe_count"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello Fred with UFCS!

0 commit comments

Comments
 (0)