mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
parent
f2ac584bb8
commit
3b79e1bc9d
2 changed files with 9 additions and 11 deletions
|
|
@ -1057,7 +1057,6 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_string_string_comparison() {
|
||||
test("'a' < 'b'", "true");
|
||||
test("'a' <= 'b'", "true");
|
||||
|
|
@ -1123,7 +1122,6 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_bigint_number_comparison() {
|
||||
test("1n < 2", "true");
|
||||
test("1n > 2", "false");
|
||||
|
|
@ -1168,7 +1166,6 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_bigint_string_comparison() {
|
||||
test("1n < '2'", "true");
|
||||
test("2n > '1'", "true");
|
||||
|
|
@ -1181,7 +1178,6 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_string_bigint_comparison() {
|
||||
test("'1' < 2n", "true");
|
||||
test("'2' > 1n", "true");
|
||||
|
|
@ -1199,10 +1195,10 @@ mod test {
|
|||
test("NaN <= 1", "false");
|
||||
test("NaN > 1", "false");
|
||||
test("NaN >= 1", "false");
|
||||
// test("NaN < 1n", "false");
|
||||
// test("NaN <= 1n", "false");
|
||||
// test("NaN > 1n", "false");
|
||||
// test("NaN >= 1n", "false");
|
||||
test("NaN < 1n", "false");
|
||||
test("NaN <= 1n", "false");
|
||||
test("NaN > 1n", "false");
|
||||
test("NaN >= 1n", "false");
|
||||
|
||||
test("NaN < NaN", "false");
|
||||
test("NaN >= NaN", "false");
|
||||
|
|
|
|||
|
|
@ -272,9 +272,11 @@ pub trait NodeUtil {
|
|||
None
|
||||
}
|
||||
}
|
||||
Expression::BigIntLiteral(_bigint_literal) => {
|
||||
// TODO: evaluate the bigint value
|
||||
None
|
||||
Expression::BigIntLiteral(bigint_literal) => {
|
||||
let value =
|
||||
self.get_string_bigint_value(bigint_literal.raw.as_str().trim_end_matches('n'));
|
||||
debug_assert!(value.is_some(), "Failed to parse {}", bigint_literal.raw);
|
||||
value
|
||||
}
|
||||
Expression::BooleanLiteral(bool_literal) => {
|
||||
if bool_literal.value {
|
||||
|
|
|
|||
Loading…
Reference in a new issue