Skip to content

Commit

Permalink
tests/test-cases: add a test for empty objects
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 6a58fc4 commit 63e42ab
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test-cases/empty-objects.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Name: Empty objects behave correctly
// Expect: int => 0

DefinitionBlock ("", "DSDT", 2, "uTEST", "TESTTABL", 0xF0F0F0F0)
{
Method (EMPT) {}

Method (MAIN) {
Local0 = EMPT()
Debug = Local0

Local0 = Package (0) { }
Debug = Local0

Local0 = 0
Local1 = Package(Local0) { }
Debug = Local1

Return (0)
}
}
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",
# Called method returns no value
"-vw", "6080",
# Object does not exist
"-vw", "6084",

Expand Down

0 comments on commit 63e42ab

Please sign in to comment.