adding test for ufcs fundamental types

This commit is contained in:
davu 2022-10-23 10:17:46 +02:00 committed by Jan Jurzitza
parent 5a04cd2404
commit 5ff0b74550
30 changed files with 383 additions and 3 deletions

View File

@ -0,0 +1,24 @@
void someBool(bool x){x.}
void someByte(byte x){x.}
void someUbyte(ubyte x){x.}
void someShort(short x){x.}
void someUshort(ushort x){x.}
void someInt(int x){x.}
void someUint(uint x){x.}
void someLong(long x){x.}
void someUlong(ulong x){x.}
void someCent(cent x){x.}
void someUcent(ucent x){x.}
void someChar(char x){x.}
void someWchar(wchar x){x.}
void someDchar(dchar x){x.}
void someFloat(float x){x.}
void someDouble(double x){x.}
void someReal(real x){x.}
void someIfloat(ifloat x){x.}
void someIdouble(idouble x){x.}
void someIreal(ireal x){x.}
void someCfloat(cfloat x){x.}
void someCdouble(cdouble x){x.}
void someCreal(creal x){x.}
void someVoid(void x){x.}

View File

@ -0,0 +1,52 @@
set -e
set -u
../../bin/dcd-client $1 -c24 file.d > test_bool_actual.txt
../../bin/dcd-client $1 -c50 file.d > test_byte_actual.txt
../../bin/dcd-client $1 -c78 file.d > test_ubyte_actual.txt
../../bin/dcd-client $1 -c105 file.d > test_short_actual.txt
../../bin/dcd-client $1 -c136 file.d > test_ushort_actual.txt
../../bin/dcd-client $1 -c160 file.d > test_int_actual.txt
../../bin/dcd-client $1 -c186 file.d > test_uint_actual.txt
../../bin/dcd-client $1 -c212 file.d > test_long_actual.txt
../../bin/dcd-client $1 -c240 file.d > test_ulong_actual.txt
../../bin/dcd-client $1 -c266 file.d > test_cent_actual.txt
../../bin/dcd-client $1 -c294 file.d > test_ucent_actual.txt
../../bin/dcd-client $1 -c320 file.d > test_char_actual.txt
../../bin/dcd-client $1 -c348 file.d > test_wchar_actual.txt
../../bin/dcd-client $1 -c376 file.d > test_dchar_actual.txt
../../bin/dcd-client $1 -c404 file.d > test_float_actual.txt
../../bin/dcd-client $1 -c434 file.d > test_double_actual.txt
../../bin/dcd-client $1 -c460 file.d > test_real_actual.txt
../../bin/dcd-client $1 -c490 file.d > test_ifloat_actual.txt
../../bin/dcd-client $1 -c522 file.d > test_idouble_actual.txt
../../bin/dcd-client $1 -c550 file.d > test_ireal_actual.txt
../../bin/dcd-client $1 -c580 file.d > test_cfloat_actual.txt
../../bin/dcd-client $1 -c612 file.d > test_cdouble_actual.txt
../../bin/dcd-client $1 -c640 file.d > test_creal_actual.txt
../../bin/dcd-client $1 -c666 file.d > test_void_actual.txt
diff test_bool_actual.txt test_bool_expected.txt
diff test_byte_actual.txt test_byte_expected.txt
diff test_ubyte_actual.txt test_ubyte_expected.txt
diff test_short_actual.txt test_short_expected.txt
diff test_ushort_actual.txt test_ushort_expected.txt
diff test_int_actual.txt test_int_expected.txt
diff test_uint_actual.txt test_uint_expected.txt
diff test_long_actual.txt test_long_expected.txt
diff test_ulong_actual.txt test_ulong_expected.txt
diff test_cent_actual.txt test_cent_expected.txt
diff test_ucent_actual.txt test_ucent_expected.txt
diff test_char_actual.txt test_char_expected.txt
diff test_wchar_actual.txt test_wchar_expected.txt
diff test_dchar_actual.txt test_dchar_expected.txt
diff test_float_actual.txt test_float_expected.txt
diff test_double_actual.txt test_double_expected.txt
diff test_real_actual.txt test_real_expected.txt
diff test_ifloat_actual.txt test_ifloat_expected.txt
diff test_idouble_actual.txt test_idouble_expected.txt
diff test_ireal_actual.txt test_ireal_expected.txt
diff test_cfloat_actual.txt test_cfloat_expected.txt
diff test_cdouble_actual.txt test_cdouble_expected.txt
diff test_creal_actual.txt test_creal_expected.txt
diff test_void_actual.txt test_void_expected.txt

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someBool F
stringof k

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someByte F
stringof k

View File

@ -0,0 +1,18 @@
identifiers
alignof k
dig k
epsilon k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
sizeof k
someCdouble F
stringof k

View File

@ -0,0 +1,18 @@
identifiers
alignof k
dig k
epsilon k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
sizeof k
someCent F
stringof k

View File

@ -0,0 +1,18 @@
identifiers
alignof k
dig k
epsilon k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
sizeof k
someCfloat F
stringof k

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someChar F
stringof k

View File

@ -0,0 +1,18 @@
identifiers
alignof k
dig k
epsilon k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
sizeof k
someCreal F
stringof k

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someDchar F
stringof k

View File

@ -0,0 +1,18 @@
identifiers
alignof k
dig k
epsilon k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
sizeof k
someDouble F
stringof k

View File

@ -0,0 +1,18 @@
identifiers
alignof k
dig k
epsilon k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
sizeof k
someFloat F
stringof k

View File

@ -0,0 +1,20 @@
identifiers
alignof k
dig k
epsilon k
im k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
re k
sizeof k
someIdouble F
stringof k

View File

@ -0,0 +1,20 @@
identifiers
alignof k
dig k
epsilon k
im k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
re k
sizeof k
someIfloat F
stringof k

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someInt F
stringof k

View File

@ -0,0 +1,20 @@
identifiers
alignof k
dig k
epsilon k
im k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
re k
sizeof k
someIreal F
stringof k

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someLong F
stringof k

View File

@ -0,0 +1,18 @@
identifiers
alignof k
dig k
epsilon k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
sizeof k
someReal F
stringof k

View File

@ -0,0 +1,2 @@
identifiers
x v

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someUbyte F
stringof k

View File

@ -0,0 +1,18 @@
identifiers
alignof k
dig k
epsilon k
infinity k
init k
mangleof k
mant_dig k
max k
max_10_exp k
max_exp k
min_10_exp k
min_exp k
min_normal k
nan k
sizeof k
someUcent F
stringof k

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someUint F
stringof k

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someUlong F
stringof k

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someUshort F
stringof k

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mangleof k
max k
min k
sizeof k
someWchar F
stringof k

View File

@ -13,5 +13,4 @@ void ufcsBarRefConstWrapped(ref const(Foo) foo, string mama) {}
void ufcsBarRefImmuttableWrapped(ref immutable(Foo) foo, string mama) {}
void ufcsBarScope(ref scope Foo foo, string mama) {}
void ufcsBarReturnScope(return scope Foo foo, string mama) {}
private void ufcsBarPrivate(Foo foo, string message) {}
void helloBar(string message) {}
private void ufcsBarPrivate(Foo foo, string message) {}

View File

@ -2,4 +2,4 @@ set -e
set -u
../../bin/dcd-client $1 -c100 -I"$PWD"/fooutils file.d > actual.txt
diff actual.txt expected.txt --strip-trailing-cr
diff actual.txt expected.txt