forked from Shastel/reverse-int
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
104 lines (82 loc) · 2.35 KB
/
test.js
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
const assert = require('assert');
const reverse = require('./src');
it('Should return 261 when 162 given', () => {
const reversed = reverse(162);
assert.equal(reversed, 261);
});
it('Should return 291 when -192 given', () => {
const reversed = reverse(-192);
assert.equal(reversed, 291);
});
it('Should return 252 when -252 given', () => {
const reversed = reverse(-252);
assert.equal(reversed, 252);
});
it('Should return 71 when 170 given', () => {
const reversed = reverse(170);
assert.equal(reversed, 71);
});
it('Should return 605 when 506 given', () => {
const reversed = reverse(506);
assert.equal(reversed, 605);
});
it('Should return 835 when -538 given', () => {
const reversed = reverse(-538);
assert.equal(reversed, 835);
});
it('Should return 465 when 564 given', () => {
const reversed = reverse(564);
assert.equal(reversed, 465);
});
it('Should return 891 when -198 given', () => {
const reversed = reverse(-198);
assert.equal(reversed, 891);
});
it('Should return 715 when -517 given', () => {
const reversed = reverse(-517);
assert.equal(reversed, 715);
});
it('Should return 601 when -106 given', () => {
const reversed = reverse(-106);
assert.equal(reversed, 601);
});
it('Should return 462 when -264 given', () => {
const reversed = reverse(-264);
assert.equal(reversed, 462);
});
it('Should return 332 when 233 given', () => {
const reversed = reverse(233);
assert.equal(reversed, 332);
});
it('Should return 763 when -367 given', () => {
const reversed = reverse(-367);
assert.equal(reversed, 763);
});
it('Should return 25 when 520 given', () => {
const reversed = reverse(520);
assert.equal(reversed, 25);
});
it('Should return 822 when 228 given', () => {
const reversed = reverse(228);
assert.equal(reversed, 822);
});
it('Should return 231 when -132 given', () => {
const reversed = reverse(-132);
assert.equal(reversed, 231);
});
it('Should return 152 when -251 given', () => {
const reversed = reverse(-251);
assert.equal(reversed, 152);
});
it('Should return 561 when 165 given', () => {
const reversed = reverse(165);
assert.equal(reversed, 561);
});
it('Should return 524 when -425 given', () => {
const reversed = reverse(-425);
assert.equal(reversed, 524);
});
it('Should return 535 when 535 given', () => {
const reversed = reverse(535);
assert.equal(reversed, 535);
});