Skip to content

Commit

Permalink
tests/test-cases: add a test case for CopyObject into self
Browse files Browse the repository at this point in the history
Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
  • Loading branch information
d-tatianin committed Oct 25, 2024
1 parent 839bf59 commit 9f57deb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/test-cases/copy-object-self.asl
Original file line number Diff line number Diff line change
@@ -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))
}
}
2 changes: 2 additions & 0 deletions tests/utilities/asl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f57deb

Please sign in to comment.