summaryrefslogtreecommitdiff
path: root/test cases/unit
diff options
context:
space:
mode:
authorVolker Weißmann <volker.weissmann@gmx.de>2025-03-16 23:01:03 +0100
committerDylan Baker <dylan@pnwbakers.com>2025-05-29 09:20:27 -0700
commit9c5c9745d02e2931e83e01ee6d055ccda6cfe14a (patch)
tree8f4f6a959c5194ecd1b89c482316195288504098 /test cases/unit
parentad10057deb4705a937bf8ae1801ce3632fa49ff8 (diff)
downloadmeson-9c5c9745d02e2931e83e01ee6d055ccda6cfe14a.tar.gz
Add AstInterpreter.dataflow_dag
Make the AstInterpreter create a directed acyclic graph (called `dataflow_dag`) that stores the how the data flowes from one node in the AST to another. Add `AstInterpreter.node_to_runtime_value` which uses `dataflow_dag` to find what value a variable at runtime will have. We don't use dataflow_dag or node_to_runtime_value anywhere yet, but it will prove useful in future commits.
Diffstat (limited to 'test cases/unit')
-rw-r--r--test cases/unit/120 rewrite/meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/test cases/unit/120 rewrite/meson.build b/test cases/unit/120 rewrite/meson.build
index 7d0330b9e..545bb0fde 100644
--- a/test cases/unit/120 rewrite/meson.build
+++ b/test cases/unit/120 rewrite/meson.build
@@ -62,6 +62,7 @@ cppcoro = declare_dependency(
)
+cpp_compiler = meson.get_compiler('cpp')
if get_option('unicode') #if comment
#if comment 2
mfc=cpp_compiler.find_library(get_option('debug')?'mfc140ud':'mfc140u')
@@ -80,6 +81,10 @@ assert(not (3 in [1, 2]), '''3 shouldn't be in [1, 2]''')
assert('b' in ['a', 'b'], ''''b' should be in ['a', 'b']''')
assert('c' not in ['a', 'b'], ''''c' shouldn't be in ['a', 'b']''')
+exe1 = 'exe1'
+exe2 = 'exe2'
+exe3 = 'exe3'
+
assert(exe1 in [exe1, exe2], ''''exe1 should be in [exe1, exe2]''')
assert(exe3 not in [exe1, exe2], ''''exe3 shouldn't be in [exe1, exe2]''')