-
Notifications
You must be signed in to change notification settings - Fork 0
/
AmisRange2.gs
51 lines (36 loc) · 1.1 KB
/
AmisRange2.gs
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
function AmisRange() {
showTitle(arguments.callee.name);
Q.test( "undef", function( assert ) {
assert.throws(
function() {
AmisMarketApp.AmisRange();
},
"InvalidArgument"
);
} );
function getNumColumns() {
var c = AmisMarketApp.AmisRange;
Q.module(arguments.callee.name);
Q.test( "invalid data", function( assert ) {
assert.throws(
function() {
(new c("dfa").getNumColumns());
},
"InvalidArgument"
);
assert.throws(
function() {
(new c("B:C").getNumColumns());
},
"InvalidArgument"
);
} );
Q.test( "trues", function( assert ) {
assert.ok( (new c("R1").getNumColumns())===1);
assert.ok( (new c("AC45").getNumColumns())===1);
assert.ok( (new c("C12:D45").getNumColumns())===2);
assert.ok( (new c("F2:AC55").getNumColumns())===24);
} );
};
getNumColumns();
};