ftnlf

Check-in [2fa1469f6c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Separate tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:2fa1469f6c75298abf62527871d9d086c1d51105
User & Date: vadim 2018-05-15 11:45:58
Context
2018-05-15
11:58
Try to remove unneeded stub file. check-in: e5a8015fca user: vadim tags: trunk
11:45
Separate tests. check-in: 2fa1469f6c user: vadim tags: trunk
10:47
Compile FX.Core plugin with CMake. check-in: 44d270d7e8 user: vadim tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to testdb.lua.

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
..
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

dir1 = {
   tbl1 = { v5 = function(x,y) return x-y end },
   tbl2 = { v6 = FXC.interp({-10,1,10,70}), v7 = -29.3e-4},

}

if true then
local A = FXC.array(4)
print(#A)
print(A[1])
A[1] = 96.7
print(A[1])
A[1] = 0.1
print(A[1])

local jjj = FXC.interp({0,1,10,0,15,-3})
print('[] ',jjj[4])
print('() ',jjj(4))

local A = FXC.apack(11,22,33,nil,nil)
print(A[1], A[2], A[3])
local B = FXC.apack(4,5,A,nil)
print(A[1], A[2], A[3])
print(#B)
print(B[1], B[2], B[3])

print('COPY:<<')
local A = FXC.apackt({11,22,33})
print(A[1], A[2], A[3])
local B = FXC.apackt({4,5},A)
print(A[1], A[2], A[3])
print(#B)
print(B[1], B[2], B[3])
print('>>')

print(FXC.aunpack(B))

local Z = FXC.array(9000)
print(FXC.aunpack(Z,nil,5))

local T = require('FX.Test')
print(T.testfun(-1.4))

A = FXC.array(10)
for k = 1, #A do
   A[k] = k
................................................................................

T.test2(A)
print('OUT: ')
for k = 1, #A do
   print(A[k])
end

print('pack shift:')
A = FXC.apack(41,42,43,nil,2)
for k = 1, #A do
   print(A[k])
end
local B = FXC.apack(55,66,A,3)
for k = 1, #A do
   print(A[k],B[k])
end
print('COPY:<<')
A = FXC.apackt({41,42,43},nil,2)
for k = 1, #A do
   print(A[k])
end
local B = FXC.apackt({55,66},A,3)
for k = 1, #A do
   print(A[k],B[k])
end
print('>>')

print('Unpack test')
local ttt = { FXC.aunpack(A,1,0) }
print(#ttt)
local ttt = { FXC.aunpack(A,nil,3) }
for i,v in ipairs(ttt) do print(i,v) end
print('---')
local ttt = { FXC.aunpack(A,4,nil) }
for i,v in ipairs(ttt) do print(i,v) end

print('Special test of pack')
A = FXC.apack(nil,6)
for k = 1, #A do
   print(A[k])
end
print('Special test of packt')
A = FXC.apackt({},3)
for k = 1, #A do
   print(A[k])
end
print('Special test of packt/2')
A = FXC.apackt({},nil,6)
for k = 1, #A do
   print(A[k])
end

local X = FXC.apackt({})
print('#[]=',#X)

local X = FXC.apack(nil,nil)
print('#[]=',#X)

end







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
16
17
18
19
20
21
22
23
































24
25
26
27
28
29
30
..
32
33
34
35
36
37
38




39
















































dir1 = {
   tbl1 = { v5 = function(x,y) return x-y end },
   tbl2 = { v6 = FXC.interp({-10,1,10,70}), v7 = -29.3e-4},

}

if false then

































local T = require('FX.Test')
print(T.testfun(-1.4))

A = FXC.array(10)
for k = 1, #A do
   A[k] = k
................................................................................

T.test2(A)
print('OUT: ')
for k = 1, #A do
   print(A[k])
end





end















































Added testfx.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
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
local FXC = require('FX.Core')

local A = FXC.array(4)
print(#A)
print(A[1])
A[1] = 96.7
print(A[1])
A[1] = 0.1
print(A[1])

local jjj = FXC.interp({0,1,10,0,15,-3})
print('[] ',jjj[4])
print('() ',jjj(4))

local A = FXC.apack(11,22,33,nil,nil)
print(A[1], A[2], A[3])
local B = FXC.apack(4,5,A,nil)
print(A[1], A[2], A[3])
print(#B)
print(B[1], B[2], B[3])

print('COPY:<<')
local A = FXC.apackt({11,22,33})
print(A[1], A[2], A[3])
local B = FXC.apackt({4,5},A)
print(A[1], A[2], A[3])
print(#B)
print(B[1], B[2], B[3])
print('>>')

print(FXC.aunpack(B))

local Z = FXC.array(9000)
print(FXC.aunpack(Z,nil,5))

print('pack shift:')
A = FXC.apack(41,42,43,nil,2)
for k = 1, #A do
   print(A[k])
end
local B = FXC.apack(55,66,A,3)
for k = 1, #A do
   print(A[k],B[k])
end
print('COPY:<<')
A = FXC.apackt({41,42,43},nil,2)
for k = 1, #A do
   print(A[k])
end
local B = FXC.apackt({55,66},A,3)
for k = 1, #A do
   print(A[k],B[k])
end
print('>>')

print('Unpack test')
local ttt = { FXC.aunpack(A,1,0) }
print(#ttt)
local ttt = { FXC.aunpack(A,nil,3) }
for i,v in ipairs(ttt) do print(i,v) end
print('---')
local ttt = { FXC.aunpack(A,4,nil) }
for i,v in ipairs(ttt) do print(i,v) end

print('Special test of pack')
A = FXC.apack(nil,6)
for k = 1, #A do
   print(A[k])
end
print('Special test of packt')
A = FXC.apackt({},3)
for k = 1, #A do
   print(A[k])
end
print('Special test of packt/2')
A = FXC.apackt({},nil,6)
for k = 1, #A do
   print(A[k])
end

local X = FXC.apackt({})
print('#[]=',#X)

local X = FXC.apack(nil,nil)
print('#[]=',#X)