mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
385 B
34 lines
385 B
|
|
/* FIXME: missing a lot of coercion tests */
|
|
|
|
/*===
|
|
true
|
|
false
|
|
true
|
|
false
|
|
true
|
|
false
|
|
===*/
|
|
|
|
print(true)
|
|
print(!true);
|
|
print(!!true);
|
|
print(false);
|
|
print(!false);
|
|
print(!!false);
|
|
|
|
/*===
|
|
false
|
|
true
|
|
true
|
|
false
|
|
false
|
|
true
|
|
===*/
|
|
|
|
print(!{}); // ToBoolean({}) -> true
|
|
print(!!{});
|
|
print(!''); // ToBoolean('') -> false
|
|
print(!!'');
|
|
print(!'a'); // ToBoolean('a') -> true
|
|
print(!!'a');
|
|
|