瀏覽代碼

Add test for DefBreak

Isaac Woods 3 年之前
父節點
當前提交
26b7ddfaf4
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      tests/while.asl

+ 10 - 0
tests/while.asl

@@ -3,4 +3,14 @@ DefinitionBlock("while.aml", "DSDT", 1, "RSACPI", "WHILE", 1) {
 	While (X < 5) {
 		X += 1
 	}
+
+	// Test `DefBreak` - Y should only make it to 5
+	Name(Y, 0)
+	While (Y < 10) {
+		If (Y >= 5) {
+			Break
+		}
+
+		Y += 1
+	}
 }