Home
last modified time | relevance | path

Searched refs:assert (Results 1 – 25 of 98) sorted by relevance

1234

/thrift-3.4.0/lib/nodejs/test/
Dbinary.test.js24 "Should read signed byte": function(assert) { argument
25 assert.equal(1, binary.readByte(0x01));
26 assert.equal(-1, binary.readByte(0xff));
28 assert.equal(127, binary.readByte(0x7f));
29 assert.equal(-128, binary.readByte(0x80));
30 assert.end();
32 "Should write byte": function(assert) { argument
34 assert.ok(true);
35 assert.end();
37 "Should read I16": function(assert) { argument
[all …]
Dexceptions.js25 test("TApplicationException", function t(assert) { argument
27 assert.ok(
31 assert.ok(e instanceof thrift.TException, "is instanceof TException");
32 assert.ok(e instanceof Error, "is instanceof Error");
33 assert.equal(typeof e.stack, "string", "has stack trace");
34 assert.ok(
38 assert.ok(
42 assert.equal(
47 assert.equal(e.message, "foo", 'has error message "foo"');
48 assert.equal(e.type, 1, "has type 1");
[all …]
Ddeep-constructor.test.js192 function assertValues(obj, assert) { argument
193 assert.equals(obj.struct_field.value, "a");
194 assert.equals(obj.struct_list_field[0].value, "b");
195 assert.equals(obj.struct_list_field[1].value, "c");
196 assert.equals(obj.struct_set_field[0].value, "d");
197 assert.equals(obj.struct_set_field[1].value, "e");
198 assert.equals(obj.struct_map_field.A.value, "f");
199 assert.equals(obj.struct_map_field.B.value, "g");
200 assert.equals(obj.struct_nested_containers_field[0][0].C[0].value, "h");
201 assert.equals(obj.struct_nested_containers_field[0][0].C[1].value, "i");
[all …]
Dtest_driver.js41 function(assert) { argument
42 const checkRecursively = makeRecursiveCheck(assert);
49 assert.error(err, fnName + ": no callback error");
59 assert.deepEqual(a.buffer, e64.buffer, m);
61 assert.equal(a, e, m);
65 testCases.deep.forEach(makeAsserter(assert.deepEqual));
67 makeAsserter(makeUnorderedDeepEqual(assert))
76 assert.error(err, "testBinary: no callback error");
77 assert.equal(response.length, 256, "testBinary");
78 assert.deepEqual(response, buf, "testBinary(Buffer)");
[all …]
Dheader.test.js33 "Should read headers from payload": function(assert) { argument
38 assert.equals(headers.Parent, "shoobar");
39 assert.equals(headers.Trace, "abcde");
40 assert.end();
42 "Should read headers when reading message begin": function(assert) { argument
49 assert.equals(headers.Parent, "shoobar");
50 assert.equals(headers.Trace, "abcde");
51 assert.equals(result.fname, "add");
52 assert.equals(result.mtype, thrift.Thrift.MessageType.CALL);
53 assert.end();
[all …]
Dint64.test.js26 "should correctly generate Int64 constants": function(assert) { argument
45 assert.ok(EXPECTED_SMALL_INT64.equals(i64types.SMALL_INT64));
46 assert.ok(EXPECTED_MAX_JS_SAFE_INT64.equals(i64types.MAX_JS_SAFE_INT64));
47 assert.ok(EXPECTED_MIN_JS_SAFE_INT64.equals(i64types.MIN_JS_SAFE_INT64));
48 assert.ok(
53 assert.ok(
58 assert.ok(EXPECTED_MAX_SIGNED_INT64.equals(i64types.MAX_SIGNED_INT64));
59 assert.ok(EXPECTED_MIN_SIGNED_INT64.equals(i64types.MIN_SIGNED_INT64));
60 assert.equal(
64 assert.equal(
[all …]
/thrift-3.4.0/lib/js/test/
Dtest-async.js35 function checkRecursively(assert, map1, map2) { argument
38 assert.equal(map1, map2);
41 checkRecursively(assert, map1[key], map2[key]);
49 QUnit.test('Void', function(assert) { argument
50 assert.expect(1);
51 const done = assert.async();
53 assert.equal(result, undefined);
59 QUnit.test('String', function(assert) { argument
60 assert.expect(3);
61 const done = assert.async(3);
[all …]
Dtest-es6.js36 function checkRecursively(assert, map1, map2) { argument
39 assert.equal(map1, map2);
42 checkRecursively(assert, map1[key], map2[key]);
50 QUnit.test('Void', function( assert ) { argument
51 assert.expect(1);
52 const done = assert.async();
54 assert.equal(result, undefined);
59 QUnit.test('String', function( assert ) { argument
60 assert.expect(3);
61 const done = assert.async(3);
[all …]
Dtest.js75 function checkRecursively(assert, map1, map2) { argument
78 assert.equal(map1, map2);
81 checkRecursively(assert, map1[key], map2[key]);
89 QUnit.test('Void', function(assert) { argument
90 assert.equal(client.testVoid(), undefined);
92 QUnit.test('Binary (String)', function(assert) { argument
97 assert.equal(client.testBinary(binary), binary);
99 QUnit.test('Binary (Uint8Array)', function(assert) { argument
108 assert.equal(client.testBinary(arr), binary);
110 QUnit.test('String', function(assert) { argument
[all …]
Dtest-jq.js39 QUnit.test('testI32', function(assert) { argument
40 assert.expect(2);
41 const done = assert.async(2);
55 assert.equal(client.recv_testI32(), Math.pow(-2, 31));
58 error: function() { assert.ok(false); },
60 assert.ok(true);
66 QUnit.test('testI64', function(assert) { argument
67 assert.expect(2);
68 const done = assert.async(2);
84 assert.equal(client.recv_testI64(), Math.pow(-2, 52));
[all …]
Dtest-double-rendering.js50 QUnit.test('Double (rendering)', function(assert) { argument
63 assert.ok(
65 assert.ok(
69 assert.ok(
73 assert.ok(
77 assert.ok(
81 assert.ok(
85 assert.ok(
89 assert.ok(
93 assert.ok(
[all …]
Ddeep-constructor.test.js128 function assertValues(obj, assert) { argument
129 assert.equal(obj.struct_field.value, 'a');
130 assert.equal(obj.struct_list_field[0].value, 'b');
131 assert.equal(obj.struct_list_field[1].value, 'c');
132 assert.equal(obj.struct_set_field[0].value, 'd');
133 assert.equal(obj.struct_set_field[1].value, 'e');
134 assert.equal(obj.struct_map_field.A.value, 'f');
135 assert.equal(obj.struct_map_field.B.value, 'g');
136 assert.equal(obj.struct_nested_containers_field[0][0].C[0].value, 'h');
137 assert.equal(obj.struct_nested_containers_field[0][0].C[1].value, 'i');
[all …]
Dtest-int64.js38 QUnit.test('Int64', function(assert) { argument
58 assert.ok(EXPECTED_SMALL_INT64.equals(Int64Test.SMALL_INT64));
59 assert.ok(EXPECTED_MAX_JS_SAFE_INT64.equals(Int64Test.MAX_JS_SAFE_INT64));
60 assert.ok(EXPECTED_MIN_JS_SAFE_INT64.equals(Int64Test.MIN_JS_SAFE_INT64));
61 assert.ok(
66 assert.ok(
71 assert.ok(EXPECTED_MAX_SIGNED_INT64.equals(Int64Test.MAX_SIGNED_INT64));
72 assert.ok(EXPECTED_MIN_SIGNED_INT64.equals(Int64Test.MIN_SIGNED_INT64));
73 assert.equal(
77 assert.equal(
[all …]
Dtest-nojq.js38 QUnit.test('Xception', function(assert) { argument
39 assert.expect(2);
40 const done = assert.async();
43 assert.equal(result.errorCode, 1001);
44 assert.equal(result.message, 'Xception');
/thrift-3.4.0/lib/ts/test/
Dtest.ts34 function checkRecursively(assert, map1: Object, map2: Object): void {
37 assert.equal(map1, map2);
40 checkRecursively(assert, map1[key], map2[key]);
49 QUnit.test('Void', function(assert) {
50 assert.equal(client.testVoid(), undefined);
52 QUnit.test('Binary (String)', function(assert) {
57 assert.equal(client.testBinary(binary), binary);
59 QUnit.test('Binary (Uint8Array)', function(assert) {
71 assert.equal(client.testBinary(hexEncodedString), binary);
73 QUnit.test('String', function(assert) {
[all …]
Dtest-int64.ts43 QUnit.test('Int64', function(assert) {
62 assert.ok(EXPECTED_SMALL_INT64.equals(Int64Test.SMALL_INT64));
63 assert.ok(EXPECTED_MAX_JS_SAFE_INT64.equals(Int64Test.MAX_JS_SAFE_INT64));
64 assert.ok(EXPECTED_MIN_JS_SAFE_INT64.equals(Int64Test.MIN_JS_SAFE_INT64));
65 assert.ok(
70 assert.ok(
75 assert.ok(EXPECTED_MAX_SIGNED_INT64.equals(Int64Test.MAX_SIGNED_INT64));
76 assert.ok(EXPECTED_MIN_SIGNED_INT64.equals(Int64Test.MIN_SIGNED_INT64));
77 assert.equal(
81 assert.equal(
[all …]
/thrift-3.4.0/lib/nodets/test/
Dtest_driver.ts40 test("NodeJS Style Callback Client Tests", function(assert) {
42 var checkRecursively = makeRecursiveCheck(assert);
49 assert.error(err, fnName + ": no callback error");
55 testCases.simple.forEach(makeAsserter(assert.equal));
57 assert.ok(a == e, m);
59 testCases.deep.forEach(makeAsserter(assert.deepEqual));
66 assert.error(err, 'testMapMap: no callback error');
67 assert.deepEqual(expected, response, "testMapMap");
71 assert.error(err, "testStruct: no callback error");
76 assert.error(err, "testNest: no callback error");
[all …]
Dint64.test.ts26 "should correctly generate Int64 constants": function(assert) {
45 assert.ok(EXPECTED_SMALL_INT64.equals(i64types.SMALL_INT64));
46 assert.ok(EXPECTED_MAX_JS_SAFE_INT64.equals(i64types.MAX_JS_SAFE_INT64));
47 assert.ok(EXPECTED_MIN_JS_SAFE_INT64.equals(i64types.MIN_JS_SAFE_INT64));
48 assert.ok(
53 assert.ok(
58 assert.ok(EXPECTED_MAX_SIGNED_INT64.equals(i64types.MAX_SIGNED_INT64));
59 assert.ok(EXPECTED_MIN_SIGNED_INT64.equals(i64types.MIN_SIGNED_INT64));
60 assert.equal(
64 assert.equal(
[all …]
/thrift-3.4.0/lib/c_glib/test/
Dtestthrifttestclient.cpp403 assert (t_test_thrift_test_client_test_void (iface, &error) == TRUE); in test_thrift_client()
404 assert (error == nullptr); in test_thrift_client()
406 assert (t_test_thrift_test_client_test_string (iface, &string, "test123", &error) == TRUE); in test_thrift_client()
407 assert (strcmp (string, "test123") == 0); in test_thrift_client()
409 assert (error == nullptr); in test_thrift_client()
411 assert (t_test_thrift_test_client_test_byte (iface, &byte, (gint8) 5, &error) == TRUE); in test_thrift_client()
412 assert (byte == 5); in test_thrift_client()
413 assert (error == nullptr); in test_thrift_client()
415 assert (t_test_thrift_test_client_test_i32 (iface, &i32, 123, &error) == TRUE); in test_thrift_client()
416 assert (i32 == 123); in test_thrift_client()
[all …]
Dtestthrifttestzlibclient.cpp402 assert (t_test_thrift_test_client_test_void (iface, &error) == TRUE); in test_thrift_client()
403 assert (error == nullptr); in test_thrift_client()
405 assert (t_test_thrift_test_client_test_string (iface, &string, "test123", &error) == TRUE); in test_thrift_client()
406 assert (strcmp (string, "test123") == 0); in test_thrift_client()
408 assert (error == nullptr); in test_thrift_client()
410 assert (t_test_thrift_test_client_test_byte (iface, &byte, (gint8) 5, &error) == TRUE); in test_thrift_client()
411 assert (byte == 5); in test_thrift_client()
412 assert (error == nullptr); in test_thrift_client()
414 assert (t_test_thrift_test_client_test_i32 (iface, &i32, 123, &error) == TRUE); in test_thrift_client()
415 assert (i32 == 123); in test_thrift_client()
[all …]
/thrift-3.4.0/lib/d/src/thrift/internal/
Dctfe.d90 static assert(ctfeToString(double.infinity) == "inf");
91 static assert(ctfeToString(-double.infinity) == "-inf");
92 static assert(ctfeToString(double.nan) == "nan");
93 static assert(ctfeToString(0.0) == "0");
94 static assert(ctfeToString(-0.0) == "-0");
95 static assert(ctfeToString(2.5) == "2.5");
96 static assert(ctfeToString(3.1415).startsWith("3.141"));
97 static assert(ctfeToString(2e-200) == "2e-200");
/thrift-3.4.0/lib/nodejs/test/episodic-code-generation-test/
Dclient.js22 const assert = require("assert"); constant
45 test("NodeJS episodic compilation client-server test", function(assert) { argument
50 assert.error(err, "no callback error");
51 assert.equal(response.number, type1Object.number + 1);
52 assert.equal(
56 assert.end();
63 assert(false, err);
/thrift-3.4.0/test/lua/
Dtest_basic_server.lua92 assert(opt[k] ~= nil, 'Unknown argument')
103 assert(handler, 'Failed to create handler')
107 assert(processor, 'Failed to create processor')
113 assert(socket, 'Failed to create server socket')
121 assert(transports[opt.transport], 'Failed to create framed transport factory')
129 assert(prot_factory, 'Failed to create binary protocol factory')
138 assert(server, 'Failed to create server')
Dtest_basic_client.lua47 assert(opt[k] ~= nil, 'Unknown argument')
55 assert(val1 == val2, msg)
63 assert(socket, 'Failed to create client socket')
71 assert(transports[opt.transport] ~= nil)
82 assert(protocols[opt.protocol] ~= nil)
86 assert(protocol, 'Failed to create binary protocol')
91 assert(client, 'Failed to create client')
95 assert(status, 'Failed to connect to server')
/thrift-3.4.0/lib/cpp/test/concurrency/
DTimerManagerTests.h131 assert(timerManager.state() == TimerManager::STARTED);
148 assert(!taskToRemove->_done);
149 assert(task->_done);
164 assert(timerManager.state() == TimerManager::STARTED);
182 assert(!taskToRemove->_done);
183 assert(task->_done);
197 assert(timerManager.state() == TimerManager::STARTED);
214 assert(!taskToRemove->_done);
215 assert(task->_done);
220 assert(nullptr == "ERROR: This remove should send a NoSuchTaskException exception.");
[all …]

1234