The BaseTen Subversion repository includes a unit test suite that can also double as example code.
If you're interested in seeing how we're testing BaseTen, head over to the trunk/UnitTests folder in the repository.
If you want to run the tests, here's how:
- Create a file called BaseTenModifications.sql using m4 in BaseTen root directory:
m4 BaseTenModifications.sql.m4 > BaseTenModifications.sql
- Change to UnitTests directory
cd UnitTests
- Create the test database. A command like this should work:
psql -f BaseTenTest.sql
- Build the tests and use otest to run them.
Developer-tools-directory/Tools/otest -SenTest BXTestLoader Your-build-directory/UnitTests.octest
