浏览代码

Add test for DefContinue

Isaac Woods 3 年之前
父节点
当前提交
ae77cb741b
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      tests/while.asl

+ 10 - 0
tests/while.asl

@@ -1,3 +1,4 @@
+// TODO: when implemented, the `+= 1`s can be turned into `++` - this requires DefIncrement
 DefinitionBlock("while.aml", "DSDT", 1, "RSACPI", "WHILE", 1) {
 	Name(X, 0)
 	While (X < 5) {
@@ -13,4 +14,13 @@ DefinitionBlock("while.aml", "DSDT", 1, "RSACPI", "WHILE", 1) {
 
 		Y += 1
 	}
+
+	// Test `DefContinue` - Z should remain at zero
+	Name(CNT, 0)
+	Name(Z, 0)
+	While (CNT < 5) {
+		CNT += 1
+		Continue
+		Z += 1
+	}
 }