summaryrefslogtreecommitdiff
path: root/js/test/ts/Slice/macros/Client.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/test/ts/Slice/macros/Client.ts')
-rw-r--r--js/test/ts/Slice/macros/Client.ts42
1 files changed, 42 insertions, 0 deletions
diff --git a/js/test/ts/Slice/macros/Client.ts b/js/test/ts/Slice/macros/Client.ts
new file mode 100644
index 00000000000..f50de29f293
--- /dev/null
+++ b/js/test/ts/Slice/macros/Client.ts
@@ -0,0 +1,42 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2018 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+import {Ice} from "ice";
+import {Test} from "./Test";
+import {TestHelper} from "../../../Common/TestHelper";
+
+const test = TestHelper.test;
+
+export class Client extends TestHelper
+{
+ allTests()
+ {
+ const out = this.getWriter();
+ out.write("testing Slice predefined macros... ");
+
+ const d = new Test._Default();
+ test(d.x == 10);
+ test(d.y == 10);
+
+ const nd = new Test.NoDefault();
+ test(nd.x != 10);
+ test(nd.y != 10);
+
+ const c = new Test.JsOnly();
+ test(c.lang == "js");
+ test(c.version == Ice.intVersion());
+
+ out.writeLine("ok");
+ }
+
+ run(args:string[])
+ {
+ this.allTests();
+ }
+}