From d0d0a02fd008df626d95384c66adcda97df92306 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Thu, 8 Oct 2020 19:15:11 +0800 Subject: [PATCH] test: added lit test for new error messages --- artiq/test/lit/codegen/custom_comparison.py | 13 +++++++++++++ artiq/test/lit/codegen/custom_inclusion.py | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 artiq/test/lit/codegen/custom_comparison.py create mode 100644 artiq/test/lit/codegen/custom_inclusion.py diff --git a/artiq/test/lit/codegen/custom_comparison.py b/artiq/test/lit/codegen/custom_comparison.py new file mode 100644 index 000000000..8a7a1d32b --- /dev/null +++ b/artiq/test/lit/codegen/custom_comparison.py @@ -0,0 +1,13 @@ +# RUN: %python -m artiq.compiler.testbench.signature +diag %s >%t +# RUN: OutputCheck %s --file-to-check=%t + +class Foo: + def __init__(self): + pass + +a = Foo() +b = Foo() + +# CHECK-L: ${LINE:+1}: error: Custom object comparison is not supported +a > b + diff --git a/artiq/test/lit/codegen/custom_inclusion.py b/artiq/test/lit/codegen/custom_inclusion.py new file mode 100644 index 000000000..92cd1a772 --- /dev/null +++ b/artiq/test/lit/codegen/custom_inclusion.py @@ -0,0 +1,13 @@ +# RUN: %python -m artiq.compiler.testbench.signature +diag %s >%t +# RUN: OutputCheck %s --file-to-check=%t + +class Foo: + def __init__(self): + pass + +a = Foo() +b = Foo() + +# CHECK-L: ${LINE:+1}: error: Custom object inclusion test is not supported +a in b +