(compatible: boolean)
| 858 | } |
| 859 | |
| 860 | function runStandardRoundTrip(compatible: boolean): void { |
| 861 | // AddressBook registration already includes the shared complex_pb types. |
| 862 | const fory = buildFory(compatible, false, [ |
| 863 | registerAddressbookTypes, |
| 864 | registerAutoIdTypes, |
| 865 | registerMonsterTypes, |
| 866 | registerComplexFbsTypes, |
| 867 | registerCollectionTypes, |
| 868 | registerOptionalTypesTypes, |
| 869 | registerExampleTypes, |
| 870 | ]); |
| 871 | |
| 872 | runFileRoundTrip( |
| 873 | "DATA_FILE", |
| 874 | fory, |
| 875 | buildAddressBook(), |
| 876 | assertAddressBookEqual, |
| 877 | ); |
| 878 | runFileRoundTrip( |
| 879 | "DATA_FILE_AUTO_ID", |
| 880 | fory, |
| 881 | buildAutoIdEnvelope(), |
| 882 | assertAutoIdEnvelopeEqual, |
| 883 | ); |
| 884 | runFileRoundTrip( |
| 885 | "DATA_FILE_PRIMITIVES", |
| 886 | fory, |
| 887 | buildPrimitiveTypes(), |
| 888 | assertPrimitiveTypesEqual, |
| 889 | ); |
| 890 | runFileRoundTrip( |
| 891 | "DATA_FILE_COLLECTION", |
| 892 | fory, |
| 893 | buildNumericCollections(), |
| 894 | assertNumericCollectionsEqual, |
| 895 | ); |
| 896 | runFileRoundTrip( |
| 897 | "DATA_FILE_COLLECTION_UNION", |
| 898 | fory, |
| 899 | buildNumericCollectionUnion(), |
| 900 | assertNumericCollectionUnionEqual, |
| 901 | ); |
| 902 | runFileRoundTrip( |
| 903 | "DATA_FILE_COLLECTION_ARRAY", |
| 904 | fory, |
| 905 | buildNumericCollectionsArray(), |
| 906 | assertNumericCollectionsArrayEqual, |
| 907 | ); |
| 908 | runFileRoundTrip( |
| 909 | "DATA_FILE_COLLECTION_ARRAY_UNION", |
| 910 | fory, |
| 911 | buildNumericCollectionArrayUnion(), |
| 912 | assertNumericCollectionArrayUnionEqual, |
| 913 | ); |
| 914 | runFileRoundTrip( |
| 915 | "DATA_FILE_OPTIONAL_TYPES", |
| 916 | fory, |
| 917 | buildOptionalHolder(), |
no test coverage detected