mirror of
https://github.com/cocos/cocos-engine.git
synced 2026-09-07 00:02:53 +08:00
* Binary serialization * Update snapshots * Update * rename option ccon -> useCCON * Missing script * encodeCCONJson: chunks -> chunkURLs * Update * (de)serializeSymbol -> (de)serializeTag; * CustomizedSerializable -> CustomSerializable * _deserializePrimitiveObject -> _fillPlainObject * Unify CCClass CCClassConstructor * encodeCCONJson -> parseCCONJson * Custom serializable * Move (de)serializeSuper(This) from context into global * property -> read(write)Property; (de)serializeThis(Super) -> (read)writeThis(Super) * CI and lint * Mock cc env
38 lines
631 B
TypeScript
38 lines
631 B
TypeScript
import { PORTS_BOTH_DYNAMIC_COMPILED, testEachPort } from "../port";
|
|
import { runTest } from "../utils";
|
|
|
|
const value = [
|
|
// Floats
|
|
0.0,
|
|
1.0,
|
|
3.1415926,
|
|
-0.618,
|
|
Number.MIN_VALUE,
|
|
Number.MAX_VALUE,
|
|
// Infinities and NaN can bot be serialized as JSON
|
|
// -Infinity,
|
|
// Infinity,
|
|
// NaN,
|
|
|
|
// Booleans
|
|
true,
|
|
false,
|
|
|
|
// Integers
|
|
0,
|
|
1,
|
|
Number.MIN_SAFE_INTEGER,
|
|
Number.MAX_SAFE_INTEGER,
|
|
|
|
// Strings
|
|
'blah blah',
|
|
];
|
|
|
|
testEachPort(PORTS_BOTH_DYNAMIC_COMPILED, async (port) => {
|
|
await runTest(
|
|
__filename,
|
|
port,
|
|
value,
|
|
);
|
|
});
|