index.uts 1.7 KB
Newer Older
Y
yurj26 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
import { testArray } from './Array.uts'
import { testDate } from './Date.uts'
import { testString } from './String.uts'
import { testError } from './Error.uts'
import { testJSON } from './JSON.uts'
import { testNumber } from './Number.uts'
import { testMap } from './Map.uts'
import { testSet } from './Set.uts'
import { testOperators } from './Operators.uts'
import { testMath } from './Math.uts'
import { testRegExp } from './RegExp.uts'
// #ifdef APP-ANDROID
// import { testReactiveArray } from './reactiveArray.uts'
// import { testReactiveMap } from './ReactiveMap.uts'
// #endif
// export { Result } from './tests.uts'

// Promise、Proxy、Reflect、Weakmap、WeakSet 不支持
export function runTests() : UTSJSONObject {
    const ArrayRes = testArray();
    const DateRes = testDate();
    const StringRes = testString();
    const ErrorRes = testError();
    const JsonRes = testJSON();
    const NumberRes = testNumber();
    const MapRes = testMap();
    const SetRes = testSet();
    const OperatorsRes = testOperators();
    const MathRes = testMath();
    const RegExpRes = testRegExp();
    // #ifdef APP-ANDROID
    // const ReactiveArrayRes = testReactiveArray();
    // const ReactiveMapRes = testReactiveMap();
    // #endif

    return {
        Array: ArrayRes,
        // #ifdef APP-ANDROID
        // ReactiveArray: ReactiveArrayRes,
        // #endif
        Date: DateRes,
        String: StringRes,
        Error: ErrorRes,
        Json: JsonRes,
        Number: NumberRes,
        Map: MapRes,
        // #ifdef APP-ANDROID
        // ReactiveMap: ReactiveMapRes,
        // #endif
        Set: SetRes,
        Operators: OperatorsRes,
        Math: MathRes,
        RegExp: RegExpRes,
    }
}