[vala/0.40] tests: Add "invalid address-of" test to increase coverage



commit e38405d7e19be209df20d8d21087a8edfd6f9668
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Nov 16 12:51:08 2019 +0100

    tests: Add "invalid address-of" test to increase coverage

 tests/Makefile.am                      | 1 +
 tests/semantic/address-of-invalid.test | 8 ++++++++
 2 files changed, 9 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fa5a33ace..f8d6004ca 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -576,6 +576,7 @@ TESTS = \
        ordering/delegate-interface.vala \
        ordering/delegate-struct.vala \
        ordering/struct-delegate.vala \
+       semantic/address-of-invalid.test \
        semantic/array-stacked.test \
        semantic/array-incompatible-initializer.test \
        semantic/array-incompatible-initializer2.test \
diff --git a/tests/semantic/address-of-invalid.test b/tests/semantic/address-of-invalid.test
new file mode 100644
index 000000000..c8a6ee502
--- /dev/null
+++ b/tests/semantic/address-of-invalid.test
@@ -0,0 +1,8 @@
+Invalid Code
+
+void foo () {
+}
+
+void main () {
+       void* f = &foo;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]