-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.lua
59 lines (47 loc) · 836 Bytes
/
main.lua
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
local ic = require("src.icecream")
local function testPosition()
local x = 1
local y = 1
ic(x,y)
ic:SetIsOutPutPosition(true)
ic(x,y)
ic:SetIsOutPutPosition(false)
end
local function testPrefix()
local x = 1
ic(x)
ic:SetPrefix('arst')
ic(x)
ic:ResetPrefix()
ic(x)
end
local function testIC()
local x = 1
local y = 2
ic(x,y)
end
local function testNoName()
ic(1,2)
end
local function testNoArg()
ic()
end
local function testFunc()
local a1 = 11
local function func(a)
return a + 23
end
ic(func(a1))
end
print('---- test ic')
testIC()
print('---- test prefix')
testPrefix()
print('---- test positoin')
testPosition()
print('---- test no name')
testNoName()
print('---- test no args')
testNoArg()
print('---- test function')
testFunc()