index.uts 2.3 KB
Newer Older
Y
yurj26 已提交
1 2 3 4
import { testArray } from './Array.uts'
import { testDate } from './Date.uts'
import { testString } from './String.uts'
import { testError } from './Error.uts'
杜庆泉's avatar
杜庆泉 已提交
5
import { testKeyWord } from './KeyWord.uts'
M
mahaifeng 已提交
6 7 8 9
import { testJSON } from './JSON.uts'
import { testJSONLarge } from './JSON_large.uts'
import { testUTSJSONObject } from './UTSJSONObject.uts'
import { testConsole } from './console.uts'
Y
yurj26 已提交
10 11 12 13 14 15
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'
16
import { testForLoop } from './ForLoop.uts'
lizhongyi_'s avatar
lizhongyi_ 已提交
17
import { testGlobal } from './Global.uts'
18
import { testType } from './Type.uts'
M
mahaifeng 已提交
19 20 21
export { Result } from './tests.uts'
import { testArrayBuffer } from './ArrayBuffer.uts'
import { testNativeCode } from './NativeCode.uts'
M
mahaifeng 已提交
22

Y
yurj26 已提交
23 24 25

// Promise、Proxy、Reflect、Weakmap、WeakSet 不支持
export function runTests() : UTSJSONObject {
Y
yurj26 已提交
26 27 28 29 30 31 32 33 34 35 36 37
  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();
  const KeyWordRes = testKeyWord();
38
  const ForLoopRes = testForLoop();
lizhongyi_'s avatar
lizhongyi_ 已提交
39
  const GlobalRes = testGlobal();
M
mahaifeng 已提交
40
  const TypeRes = testType();
41
  const JSONLargeRes = testJSONLarge();
M
mahaifeng 已提交
42 43 44 45 46 47
  const consoleRes = testConsole();
  const UTSJSONObjectRes = testUTSJSONObject();

  // #ifdef  APP-ANDROID || WEB
  const ArrayBufferRes = testArrayBuffer();
  // #endif
杜庆泉's avatar
杜庆泉 已提交
48
  const NativeCodeRes = testNativeCode();
Y
yurj26 已提交
49 50 51 52 53
  return {
    Array: ArrayRes,
    Date: DateRes,
    String: StringRes,
    Error: ErrorRes,
M
mahaifeng 已提交
54 55
    Json: JsonRes,
    JSONLarge: JSONLargeRes,
Y
yurj26 已提交
56 57 58 59 60 61 62
    Number: NumberRes,
    Map: MapRes,
    Set: SetRes,
    Operators: OperatorsRes,
    Math: MathRes,
    RegExp: RegExpRes,
    KeyWord: KeyWordRes,
63
    ForLoop: ForLoopRes,
M
mahaifeng 已提交
64 65 66 67 68 69 70 71
    Global: GlobalRes,
    Type: TypeRes,
    console: consoleRes,
    UTSJSONObject: UTSJSONObjectRes,
    // #ifdef  APP-ANDROID || WEB
    ArrayBuffer: ArrayBufferRes,
    // #endif
    NativeCode: NativeCodeRes
Y
yurj26 已提交
72
  }
Y
yurj26 已提交
73
}