From 9f57debe91029a3ccee53e93fb33075e68ce023c Mon Sep 17 00:00:00 2001 From: Daniil Tatianin <99danilt@gmail.com> Date: Sat, 26 Oct 2024 02:04:59 +0300 Subject: [PATCH] tests/test-cases: add a test case for CopyObject into self Signed-off-by: Daniil Tatianin <99danilt@gmail.com> --- tests/test-cases/copy-object-self.asl | 27 +++++++++++++++++++++++++++ tests/utilities/asl.py | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 tests/test-cases/copy-object-self.asl diff --git a/tests/test-cases/copy-object-self.asl b/tests/test-cases/copy-object-self.asl new file mode 100644 index 00000000..c86481a6 --- /dev/null +++ b/tests/test-cases/copy-object-self.asl @@ -0,0 +1,27 @@ +// Name: CopyObject on yourself works +// Expect: str => Hello World + +DefinitionBlock ("", "DSDT", 2, "uTEST", "TESTTABL", 0xF0F0F0F0) +{ + Method (BAR, 1) { + Debug = "Enter BAR" + CopyObject (Arg0, BAR) + Debug = "Leave BAR" + } + + Method (FOO) { + Debug = "Enter FOO" + CopyObject("Hello", FOO) + BAR(" World") + Debug = "Leave FOO" + + Return (0x123) + } + + Method (MAIN) { + Local0 = FOO() + Printf("First invocation of FOO returned %o", Local0) + + Return (Concatenate(FOO, BAR)) + } +} diff --git a/tests/utilities/asl.py b/tests/utilities/asl.py index 3aabd448..d2023613 100644 --- a/tests/utilities/asl.py +++ b/tests/utilities/asl.py @@ -152,6 +152,8 @@ def compile(path: str, compiler: str, bin_dir: str) -> str: # One or more objects within the Pathname do not exist "-vw", "6161", + # Too few arguments + "-vw", "6005", # Called method returns no value "-vw", "6080", # Object does not exist