Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 183a5a4439
Fetching contributors…

Cannot retrieve contributors at this time

file 32 lines (22 sloc) 0.916 kb
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
# Test the PlaneGeom

import unittest
from cgkit import _core
from cgkit.all import *
from _utils import *
    

class TestPlaneGeom(unittest.TestCase):
    
    def testVariables_Size(self):
        """Check the size of primitive variables."""

        geom = PlaneGeom()

        self.assertEqual(geom.uniformCount(), 1)
        self.assertEqual(geom.varyingCount(), 4)
        self.assertEqual(geom.vertexCount(), 4)
        self.assertEqual(geom.faceVaryingCount(), 0)
        self.assertEqual(geom.faceVertexCount(), 0)

        # Create new variables and check the sizes of the slots...
        createVars(geom)
        checkVars(self, geom, uniform=1, var=4, vtx=4, facevar=0, facevtx=0)

        # Check that slots can't be resized (except user vars)
        checkVarResize(self, geom)

######################################################################

if __name__=="__main__":
    unittest.main()
Something went wrong with that request. Please try again.