Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Dec 30, 2024
1 parent 8ca43b5 commit b0a2ce5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ export function render(_ctx) {
const _directive_test = _resolveDirective("test")
const n4 = _createComponentWithFallback(_component_Comp, null, {
"default": () => {
const n0 = _createIf(() => (true), () => {
const n0 = _createIf(() => (true) && (() => {
const n3 = t0()
const n2 = _createComponentWithFallback(_component_Bar)
_withDirectives(n2, [[_directive_hello, void 0, void 0, { world: true }]])
_insert(n2, n3)
return n3
})
}))
return n0
}
}, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const t0 = _template("<div></div>", true)
export function render(_ctx) {
const _setTemplateRef = _createTemplateRefSetter()
const n0 = _createIf(() => (true), () => {
const n0 = _createIf(() => (true) && (() => {
const n2 = t0()
_setTemplateRef(n2, "foo")
return n2
})
}))
return n0
}"
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ exports[`compiler: v-if > basic v-if 1`] = `
const t0 = _template("<div></div>", true)
export function render(_ctx) {
const n0 = _createIf(() => (_ctx.ok), () => {
const n0 = _createIf(() => (_ctx.ok) && (() => {
const n2 = t0()
_renderEffect(() => _setText(n2, _ctx.msg))
return n2
})
}))
return n0
}"
`;
Expand All @@ -25,18 +25,18 @@ const t5 = _template("<input>")
export function render(_ctx) {
const n13 = t5()
const n0 = _createIf(() => (_ctx.ok), () => {
const n0 = _createIf(() => (_ctx.ok) ? () => {
const n2 = t0()
return n2
}, () => _createIf(() => (_ctx.orNot), () => {
} : () => (_ctx.orNot) ? () => {
const n5 = t1()
const n6 = t2()
return [n5, n6]
}, () => {
} : () => {
const n10 = t3()
const n11 = t4()
return [n10, n11]
}))
})
_renderEffect(() => _setText(n13, _ctx.text))
return [n0, n13]
}"
Expand All @@ -47,14 +47,14 @@ exports[`compiler: v-if > dedupe same template 1`] = `
const t0 = _template("<div>hello</div>")
export function render(_ctx) {
const n0 = _createIf(() => (_ctx.ok), () => {
const n0 = _createIf(() => (_ctx.ok) && (() => {
const n2 = t0()
return n2
})
const n3 = _createIf(() => (_ctx.ok), () => {
}))
const n3 = _createIf(() => (_ctx.ok) && (() => {
const n5 = t0()
return n5
})
}))
return [n0, n3]
}"
`;
Expand All @@ -66,13 +66,13 @@ const t1 = _template("hello")
const t2 = _template("<p></p>", true)
export function render(_ctx) {
const n0 = _createIf(() => (_ctx.ok), () => {
const n0 = _createIf(() => (_ctx.ok) && (() => {
const n2 = t0()
const n3 = t1()
const n4 = t2()
_renderEffect(() => _setText(n4, _ctx.msg))
return [n2, n3, n4]
})
}))
return n0
}"
`;
Expand All @@ -83,10 +83,10 @@ const t0 = _template("<div></div>")
const t1 = _template("<p></p>")
export function render(_ctx) {
const n0 = _createIf(() => (_ctx.ok), () => {
const n0 = _createIf(() => (_ctx.ok) ? () => {
const n2 = t0()
return n2
}, () => {
} : () => {
const n4 = t1()
return n4
})
Expand All @@ -101,16 +101,16 @@ const t1 = _template("<p></p>")
const t2 = _template("fine")
export function render(_ctx) {
const n0 = _createIf(() => (_ctx.ok), () => {
const n0 = _createIf(() => (_ctx.ok) ? () => {
const n2 = t0()
return n2
}, () => _createIf(() => (_ctx.orNot), () => {
} : () => (_ctx.orNot) ? () => {
const n4 = t1()
return n4
}, () => {
} : () => {
const n7 = t2()
return n7
}))
})
return n0
}"
`;
Expand All @@ -121,10 +121,10 @@ const t0 = _template("<div></div>")
const t1 = _template("<p></p>")
export function render(_ctx) {
const n0 = _createIf(() => (_ctx.ok), () => {
const n0 = _createIf(() => (_ctx.ok) ? () => {
const n2 = t0()
return n2
}, () => _createIf(() => (_ctx.orNot), () => {
} : () => (_ctx.orNot) && (() => {
const n4 = t1()
return n4
}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ exports[`compiler: v-once > with v-if 1`] = `
const t0 = _template("<div></div>", true)
export function render(_ctx) {
const n0 = _createIf(() => (_ctx.expr), () => {
const n0 = _createIf(() => (_ctx.expr) && (() => {
const n2 = t0()
return n2
}, null, true)
}), true)
return n0
}"
`;
Expand All @@ -92,10 +92,10 @@ const t0 = _template("<div></div>")
const t1 = _template("<p></p>")
export function render(_ctx) {
const n0 = _createIf(() => (_ctx.expr), () => {
const n0 = _createIf(() => (_ctx.expr) ? () => {
const n2 = t0()
return n2
}, () => {
} : () => {
const n4 = t1()
return n4
}, true)
Expand Down

0 comments on commit b0a2ce5

Please sign in to comment.