Skip to content

Tests - Need a "threeenp1" test

All wrappers need a "threeenp1" test that that solves the classic 3n+1 problem for given numbers so this needs to be written for the Python wrapper. This test will both exercise the wrapper (making sure that the wrapper is easily usable) and provides a standard example implementation that will be pointed to by the documentation. This is a multi-process and/or multi-thread test. The test(s) should be added to a new python test suite in the test system.

For example, the C wrapper's version of this test (https://gitlab.com/YottaDB/DB/YDBTest/-/blob/master/v62002/inref/simplethreadapi_threeen1f.c) uses threads to do its processing.

For Go, there are both goroutine versions of threeenp1 (https://gitlab.com/YottaDB/DB/YDBTest/-/blob/master/go/inref/threeenp1B1.go and https://gitlab.com/YottaDB/DB/YDBTest/-/blob/master/go/inref/threeenp1B2.go) and a multi-process version (https://gitlab.com/YottaDB/DB/YDBTest/-/blob/master/go/inref/threeenp1C2.go). Having both (if possible) can make it easier to find issues when we do a "fatal_signal" test later that uses these same routines.

For further reference, the original M version is here: https://gitlab.com/YottaDB/DB/YDBTest/-/blob/master/v62002/inref/threeen1f.m

Edited by Steven Estes