File tree 2 files changed +45
-0
lines changed
2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const power = null ;
4
+ const square = null ;
5
+ const cube = null ;
6
+
7
+ module . exports = { power, square, cube } ;
Original file line number Diff line number Diff line change
1
+ [{
2
+ name: 'power',
3
+ length: [32, 32],
4
+ cases: [
5
+ [0, 0, 1],
6
+ [1, 1, 1],
7
+ [1, 2, 1],
8
+ [2, 1, 2],
9
+ [2, 2, 4],
10
+ [3, 1, 3],
11
+ [3, 2, 9],
12
+ [3, 3, 27],
13
+ [1, -1, 1],
14
+ [1, -2, 1],
15
+ [2, -1, 0.5],
16
+ [2, -2, 0.25],
17
+ ],
18
+ test: power => {
19
+ const src = power.toString();
20
+ if (src !== 'function pow() { [native code] }') {
21
+ throw new Error('Function power expected to be reference to Math.pow');
22
+ }
23
+ }
24
+ }, {
25
+ name: 'square',
26
+ length: [10, 25],
27
+ cases: [
28
+ ]
29
+ }, {
30
+ name: 'cube',
31
+ length: [29, 29],
32
+ test: cube => {
33
+ const src = cube.toString();
34
+ if (src !== 'function () { [native code] }') {
35
+ throw new Error('Function cube expected to be binded Math.pow');
36
+ }
37
+ }
38
+ }]
You can’t perform that action at this time.
0 commit comments