]> gitweb.factorcode.org Git - factor.git/blob - basis/opengl/textures/textures-tests.factor
45b1d8f7068522ec65385938f92509b97b1f3ed9
[factor.git] / basis / opengl / textures / textures-tests.factor
1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test opengl.textures opengl.textures.private
4 images kernel namespaces ;
5 IN: opengl.textures.tests
6
7 [ ] [
8     { 3 5 }
9     RGB
10     B{
11         1 2 3 4 5 6 7 8 9
12         10 11 12 13 14 15 16 17 18
13         19 20 21 22 23 24 25 26 27
14         28 29 30 31 32 33 34 35 36
15         37 38 39 40 41 42 43 44 45
16     } image boa "image" set
17 ] unit-test
18
19 [
20     T{ image
21         { dim { 4 8 } }
22         { component-order RGB }
23         { bitmap
24           B{
25               1 2 3 4 5 6 7 8 9 7 8 9
26               10 11 12 13 14 15 16 17 18 16 17 18
27               19 20 21 22 23 24 25 26 27 25 26 27
28               28 29 30 31 32 33 34 35 36 34 35 36
29               37 38 39 40 41 42 43 44 45 43 44 45
30               37 38 39 40 41 42 43 44 45 43 44 45
31               37 38 39 40 41 42 43 44 45 43 44 45
32               37 38 39 40 41 42 43 44 45 43 44 45
33           }
34         }
35     }
36 ] [
37     "image" get power-of-2-image
38 ] unit-test
39
40 [
41     T{ image
42        { dim { 0 0 } }
43        { component-order R32G32B32 }
44        { bitmap B{ } } }
45 ] [
46     T{ image
47        { dim { 0 0 } }
48        { component-order R32G32B32 }
49        { bitmap B{ } }
50     } power-of-2-image
51 ] unit-test