From f87b6327879ce425531bc1d83f3053c36773d27e Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 2 Jun 2020 14:05:35 -0400 Subject: Make stdlib path just be the filename. (#1364) * Made bad-operaor-call available on all targets. Fix the line filename to not inclue path, to avoid paths being absolute and therefores value be host environment dependent (causing tests to fail). * Disable on linux because theres still a problem on gcc x86 where the file path is different. * Fix to some typos in bad-operator-call.slang * Fix diagnostic for bad-operator-call.slang --- tests/diagnostics/bad-operator-call.slang | 1 + tests/diagnostics/bad-operator-call.slang.expected | 94 +++++++++++----------- 2 files changed, 48 insertions(+), 47 deletions(-) (limited to 'tests') diff --git a/tests/diagnostics/bad-operator-call.slang b/tests/diagnostics/bad-operator-call.slang index 449d2dbc1..1455d1cc3 100644 --- a/tests/diagnostics/bad-operator-call.slang +++ b/tests/diagnostics/bad-operator-call.slang @@ -1,4 +1,5 @@ // bad-operator-call.slang + //DIAGNOSTIC_TEST(windows):SIMPLE: // Test that bad calls to operators produce reasonable diagnostic messages. diff --git a/tests/diagnostics/bad-operator-call.slang.expected b/tests/diagnostics/bad-operator-call.slang.expected index fd85fdbfc..1aac5cbef 100644 --- a/tests/diagnostics/bad-operator-call.slang.expected +++ b/tests/diagnostics/bad-operator-call.slang.expected @@ -1,52 +1,52 @@ result code = -1 standard error = { -tests/diagnostics/bad-operator-call.slang(17): error 39999: no overload for '+=' applicable to arguments of type (int, S) -core.meta.slang(1745): note 39999: candidate: func +=(matrix, T) -> matrix -core.meta.slang(1737): note 39999: candidate: func +=(matrix, matrix) -> matrix -core.meta.slang(1729): note 39999: candidate: func +=(vector, T) -> vector -core.meta.slang(1721): note 39999: candidate: func +=(vector, vector) -> vector -core.meta.slang(1713): note 39999: candidate: func +=(T, T) -> T -tests/diagnostics/bad-operator-call.slang(19): error 39999: no overload for '+' applicable to arguments of type (int, S) -core.meta.slang(1635): note 39999: candidate: func +(uint64_t, uint64_t) -> uint64_t -core.meta.slang(1628): note 39999: candidate: func +(uint, uint) -> uint -core.meta.slang(1621): note 39999: candidate: func +(uint16_t, uint16_t) -> uint16_t -core.meta.slang(1614): note 39999: candidate: func +(uint8_t, uint8_t) -> uint8_t -core.meta.slang(1607): note 39999: candidate: func +(double, double) -> double -core.meta.slang(1600): note 39999: candidate: func +(float, float) -> float -core.meta.slang(1593): note 39999: candidate: func +(half, half) -> half -core.meta.slang(1586): note 39999: candidate: func +(int64_t, int64_t) -> int64_t -core.meta.slang(1579): note 39999: candidate: func +(int, int) -> int -core.meta.slang(1572): note 39999: candidate: func +(int16_t, int16_t) -> int16_t -tests/diagnostics/bad-operator-call.slang(19): note 39999: 1 more overload candidates -tests/diagnostics/bad-operator-call.slang(21): error 39999: no overload for '~' applicable to arguments of type (S) -slang-stdlib.cpp(1646): note 39999: candidate: func ~(uint64_t) -> uint64_t -slang-stdlib.cpp(1643): note 39999: candidate: func ~(uint) -> uint -slang-stdlib.cpp(1640): note 39999: candidate: func ~(uint16_t) -> uint16_t -slang-stdlib.cpp(1637): note 39999: candidate: func ~(uint8_t) -> uint8_t -slang-stdlib.cpp(1634): note 39999: candidate: func ~(int64_t) -> int64_t -slang-stdlib.cpp(1631): note 39999: candidate: func ~(int) -> int -slang-stdlib.cpp(1628): note 39999: candidate: func ~(int16_t) -> int16_t -slang-stdlib.cpp(1625): note 39999: candidate: func ~(int8_t) -> int8_t -tests/diagnostics/bad-operator-call.slang(26): error 30047: argument passed to parameter '0' must be l-value. -tests/diagnostics/bad-operator-call.slang(26): note 30048: argument was implicitly cast from 'int' to 'vector', and Slang does not support using an implicit cast as an l-value -tests/diagnostics/bad-operator-call.slang(30): error 39999: no overload for '+=' applicable to arguments of type (vector, vector) -core.meta.slang(1745): note 39999: candidate: func +=(matrix, T) -> matrix -core.meta.slang(1737): note 39999: candidate: func +=(matrix, matrix) -> matrix -core.meta.slang(1729): note 39999: candidate: func +=(vector, T) -> vector -core.meta.slang(1721): note 39999: candidate: func +=(vector, vector) -> vector -core.meta.slang(1713): note 39999: candidate: func +=(T, T) -> T -tests/diagnostics/bad-operator-call.slang(32): error 39999: no overload for '+' applicable to arguments of type (vector, vector) -core.meta.slang(1640): note 39999: candidate: func +<4>(vector, uint64_t) -> vector -core.meta.slang(1638): note 39999: candidate: func +<3>(uint64_t, vector) -> vector -core.meta.slang(1635): note 39999: candidate: func +(uint64_t, uint64_t) -> uint64_t -core.meta.slang(1633): note 39999: candidate: func +<4>(vector, uint) -> vector -core.meta.slang(1631): note 39999: candidate: func +<3>(uint, vector) -> vector -core.meta.slang(1628): note 39999: candidate: func +(uint, uint) -> uint -core.meta.slang(1626): note 39999: candidate: func +<4>(vector, uint16_t) -> vector -core.meta.slang(1624): note 39999: candidate: func +<3>(uint16_t, vector) -> vector -core.meta.slang(1621): note 39999: candidate: func +(uint16_t, uint16_t) -> uint16_t -core.meta.slang(1619): note 39999: candidate: func +<4>(vector, uint8_t) -> vector -tests/diagnostics/bad-operator-call.slang(32): note 39999: 23 more overload candidates +tests/diagnostics/bad-operator-call.slang(18): error 39999: no overload for '+=' applicable to arguments of type (int, S) +core.meta.slang(1762): note 39999: candidate: func +=(matrix, T) -> matrix +core.meta.slang(1754): note 39999: candidate: func +=(matrix, matrix) -> matrix +core.meta.slang(1746): note 39999: candidate: func +=(vector, T) -> vector +core.meta.slang(1738): note 39999: candidate: func +=(vector, vector) -> vector +core.meta.slang(1730): note 39999: candidate: func +=(T, T) -> T +tests/diagnostics/bad-operator-call.slang(20): error 39999: no overload for '+' applicable to arguments of type (int, S) +core.meta.slang(1652): note 39999: candidate: func +(uint64_t, uint64_t) -> uint64_t +core.meta.slang(1645): note 39999: candidate: func +(uint, uint) -> uint +core.meta.slang(1638): note 39999: candidate: func +(uint16_t, uint16_t) -> uint16_t +core.meta.slang(1631): note 39999: candidate: func +(uint8_t, uint8_t) -> uint8_t +core.meta.slang(1624): note 39999: candidate: func +(double, double) -> double +core.meta.slang(1617): note 39999: candidate: func +(float, float) -> float +core.meta.slang(1610): note 39999: candidate: func +(half, half) -> half +core.meta.slang(1603): note 39999: candidate: func +(int64_t, int64_t) -> int64_t +core.meta.slang(1596): note 39999: candidate: func +(int, int) -> int +core.meta.slang(1589): note 39999: candidate: func +(int16_t, int16_t) -> int16_t +tests/diagnostics/bad-operator-call.slang(20): note 39999: 1 more overload candidates +tests/diagnostics/bad-operator-call.slang(22): error 39999: no overload for '~' applicable to arguments of type (S) +slang-stdlib.cpp(1644): note 39999: candidate: func ~(uint64_t) -> uint64_t +slang-stdlib.cpp(1641): note 39999: candidate: func ~(uint) -> uint +slang-stdlib.cpp(1638): note 39999: candidate: func ~(uint16_t) -> uint16_t +slang-stdlib.cpp(1635): note 39999: candidate: func ~(uint8_t) -> uint8_t +slang-stdlib.cpp(1632): note 39999: candidate: func ~(int64_t) -> int64_t +slang-stdlib.cpp(1629): note 39999: candidate: func ~(int) -> int +slang-stdlib.cpp(1626): note 39999: candidate: func ~(int16_t) -> int16_t +slang-stdlib.cpp(1623): note 39999: candidate: func ~(int8_t) -> int8_t +tests/diagnostics/bad-operator-call.slang(27): error 30047: argument passed to parameter '0' must be l-value. +tests/diagnostics/bad-operator-call.slang(27): note 30048: argument was implicitly cast from 'int' to 'vector', and Slang does not support using an implicit cast as an l-value +tests/diagnostics/bad-operator-call.slang(31): error 39999: no overload for '+=' applicable to arguments of type (vector, vector) +core.meta.slang(1762): note 39999: candidate: func +=(matrix, T) -> matrix +core.meta.slang(1754): note 39999: candidate: func +=(matrix, matrix) -> matrix +core.meta.slang(1746): note 39999: candidate: func +=(vector, T) -> vector +core.meta.slang(1738): note 39999: candidate: func +=(vector, vector) -> vector +core.meta.slang(1730): note 39999: candidate: func +=(T, T) -> T +tests/diagnostics/bad-operator-call.slang(33): error 39999: no overload for '+' applicable to arguments of type (vector, vector) +core.meta.slang(1657): note 39999: candidate: func +<4>(vector, uint64_t) -> vector +core.meta.slang(1655): note 39999: candidate: func +<3>(uint64_t, vector) -> vector +core.meta.slang(1652): note 39999: candidate: func +(uint64_t, uint64_t) -> uint64_t +core.meta.slang(1650): note 39999: candidate: func +<4>(vector, uint) -> vector +core.meta.slang(1648): note 39999: candidate: func +<3>(uint, vector) -> vector +core.meta.slang(1645): note 39999: candidate: func +(uint, uint) -> uint +core.meta.slang(1643): note 39999: candidate: func +<4>(vector, uint16_t) -> vector +core.meta.slang(1641): note 39999: candidate: func +<3>(uint16_t, vector) -> vector +core.meta.slang(1638): note 39999: candidate: func +(uint16_t, uint16_t) -> uint16_t +core.meta.slang(1636): note 39999: candidate: func +<4>(vector, uint8_t) -> vector +tests/diagnostics/bad-operator-call.slang(33): note 39999: 23 more overload candidates } standard output = { } -- cgit v1.2.3