TestCreate
TestCreate[input]
create a TestObject to determine whether input evaluates to True.
TestCreate[input,expected]
create a TestObject to determine whether input evaluates to expected.
TestCreate[input,expected,messages]
create a TestObject that is expected to generate the list of message names messages.
Details and Options

- TestCreate returns a TestObject.
- TestCreate has attribute HoldAllComplete, therefore it does not immediately evaluate input or expected.
- Use TestReport or TestEvaluate to run a test created by TestCreate.
- TestCreate has the following options:
-
MemoryConstraint Infinity memory (in bytes) the test is allowed to use MetaInformation < > extra information associated with the test SameTest SameQ function to compare actual and expected output TestID None unique identifier for the test TimeConstraint Infinity time (in seconds) the test is allowed to use - TestIDAutomatic creates a unique UUID each time the test is created.
Examples
Basic Examples (3)
Create a test that tests whether the input evaluates to True:
Test whether the input evaluates to the expected output:
Text
Wolfram Research (2023), TestCreate, Wolfram Language function, https://reference.wolfram.com/language/ref/TestCreate.html.
CMS
Wolfram Language. 2023. "TestCreate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TestCreate.html.
APA
Wolfram Language. (2023). TestCreate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TestCreate.html