47 lines
1.1 KiB
Python
47 lines
1.1 KiB
Python
import sys
|
|
import os
|
|
|
|
import uLib
|
|
|
|
def test_core():
|
|
print("Testing Core module...")
|
|
obj = uLib.Core.Object()
|
|
print("Core Object created:", obj)
|
|
|
|
timer = uLib.Core.Timer()
|
|
timer.Start()
|
|
print("Core Timer started")
|
|
|
|
options = uLib.Core.Options("Test Options")
|
|
print("Core Options created:", options)
|
|
|
|
def test_math():
|
|
print("Testing Math module...")
|
|
|
|
# Test AffineTransform
|
|
transform = uLib.Math.AffineTransform()
|
|
print("AffineTransform created")
|
|
|
|
# Test Geometry
|
|
geom = uLib.Math.Geometry()
|
|
print("Geometry created")
|
|
|
|
# Test StructuredData
|
|
data = uLib.Math.StructuredData([10, 10, 10])
|
|
print("StructuredData created with dims:", data.GetDims())
|
|
|
|
# Test Structured2DGrid
|
|
grid2d = uLib.Math.Structured2DGrid()
|
|
grid2d.SetDims([100, 100])
|
|
print("Structured2DGrid created with dims:", grid2d.GetDims())
|
|
|
|
# Test TriangleMesh
|
|
mesh = uLib.Math.TriangleMesh()
|
|
print("TriangleMesh created")
|
|
|
|
print("All tests passed successfully!")
|
|
|
|
if __name__ == "__main__":
|
|
test_core()
|
|
test_math()
|