Skip to content

Commit

Permalink
Update tyOpTest
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnaldo committed Oct 5, 2024
1 parent 1f6ab30 commit 0f1b0e4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/main/resources/result/spec-summary
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
- algorithm steps: 20532 (96.91%)
- complete: 19898
- incomplete: 634
- types: 7330 (95.08%)
- known: 6969
- yet: 361
- types: 7330 (95.10%)
- known: 6971
- yet: 359
- unknown: 625
- tables: 94
- type model: 90
- type model: 92
4 changes: 3 additions & 1 deletion src/main/scala/esmeta/ty/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ lazy val AbruptT: ValueTy = ValueTy(record = RecordTy("AbruptCompletion"))
def AbruptT(xs: String*): ValueTy = AbruptT(xs.toSet)
def AbruptT(xs: Set[String]): ValueTy =
ValueTy(record = RecordTy("AbruptCompletion", Map("Type" -> EnumT(xs.toSet))))
lazy val ThrowT: ValueTy = RecordT("ThrowCompletion")
lazy val BreakT: ValueTy = RecordT("BreakCompletion")
lazy val ContinueT: ValueTy = RecordT("ContinueCompletion")
lazy val ReturnT: ValueTy = RecordT("ReturnCompletion")
lazy val ThrowT: ValueTy = RecordT("ThrowCompletion")
lazy val NormalT: ValueTy = ValueTy(record = RecordTy("NormalCompletion"))
def NormalT(value: ValueTy): ValueTy =
if (value.isBottom) BotT
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/esmeta/ty/OpTinyTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class OpTinyTest extends TyTest {
def init: Unit = {
checkEqual("or")(
(ObjectT || FunctionT) -> ObjectT,
(ReturnT || AbruptT("break")) -> AbruptT("break", "return"),
(ReturnT || AbruptT("break")) -> (ReturnT || BreakT),
(FunctionT || RecordT("ECMAScriptFunctionObject")) -> FunctionT,
)

Expand Down

0 comments on commit 0f1b0e4

Please sign in to comment.