From a02e812de8a05e491f868a372868eb51a0dcd0ba Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Wed, 27 Apr 2022 11:10:20 +0200 Subject: [PATCH] add test for the Instance token --- python/ql/test/library-tests/frameworks/data/test.expected | 1 + python/ql/test/library-tests/frameworks/data/test.py | 4 +++- python/ql/test/library-tests/frameworks/data/test.ql | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/python/ql/test/library-tests/frameworks/data/test.expected b/python/ql/test/library-tests/frameworks/data/test.expected index b521a4a3018..c82438b93fc 100644 --- a/python/ql/test/library-tests/frameworks/data/test.expected +++ b/python/ql/test/library-tests/frameworks/data/test.expected @@ -39,6 +39,7 @@ isSource | test.py:24:45:24:48 | ControlFlowNode for four | test-source | | test.py:25:34:25:39 | ControlFlowNode for second | test-source | | test.py:39:11:39:20 | ControlFlowNode for Await | test-source | +| test.py:41:8:41:27 | ControlFlowNode for Attribute() | test-source | syntaxErrors | Member[foo | | Member[foo] .Member[bar] | diff --git a/python/ql/test/library-tests/frameworks/data/test.py b/python/ql/test/library-tests/frameworks/data/test.py index 0dcbd633a2b..6860ef1211d 100644 --- a/python/ql/test/library-tests/frameworks/data/test.py +++ b/python/ql/test/library-tests/frameworks/data/test.py @@ -36,4 +36,6 @@ from testlib import CommonTokens async def async_func(): prom = CommonTokens.makePromise(1); - val = await prom \ No newline at end of file + val = await prom + +inst = CommonTokens.Class() \ No newline at end of file diff --git a/python/ql/test/library-tests/frameworks/data/test.ql b/python/ql/test/library-tests/frameworks/data/test.ql index 96a4fe38cf2..38b505cd768 100644 --- a/python/ql/test/library-tests/frameworks/data/test.ql +++ b/python/ql/test/library-tests/frameworks/data/test.ql @@ -73,6 +73,7 @@ class Sources extends ModelInput::SourceModelCsv { "testlib;;Member[Callbacks].Member[nonFirst].Argument[0].Parameter[1..];test-source", // // Common tokens. "testlib;;Member[CommonTokens].Member[makePromise].ReturnValue.Awaited;test-source", // + "testlib;;Member[CommonTokens].Member[Class].Instance;test-source", // ] } }