mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
20
Libraries/LibJS/Tests/operators/ternary-basic.js
Normal file
20
Libraries/LibJS/Tests/operators/ternary-basic.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
test("basic functionality", () => {
|
||||
const x = 1;
|
||||
|
||||
expect(x === 1 ? true : false).toBeTrue();
|
||||
expect(x ? x : 0).toBe(x);
|
||||
expect(1 < 2 ? true : false).toBeTrue();
|
||||
expect(0 ? 1 : 1 ? 10 : 20).toBe(10);
|
||||
expect(0 ? (1 ? 1 : 10) : 20).toBe(20);
|
||||
});
|
||||
|
||||
test("object values", () => {
|
||||
const o = {};
|
||||
o.f = true;
|
||||
expect(o.f ? true : false).toBeTrue();
|
||||
expect(1 ? o.f : null).toBeTrue();
|
||||
});
|
||||
|
||||
test("issue #4409, '?.' followed by decimal digit", () => {
|
||||
expect("false?.1:.2").toEvalTo(0.2);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue