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

Examples

Basic Examples  (3)

Create a test that tests whether the input evaluates to True:

Evaluate the test:

Test whether the input evaluates to the expected output:

This test gives the expected output but emits messages:

Add the expected message:

Wolfram Research (2023), TestCreate, Wolfram Language function, https://reference.wolfram.com/language/ref/TestCreate.html.

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

BibTeX

@misc{reference.wolfram_2023_testcreate, author="Wolfram Research", title="{TestCreate}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/TestCreate.html}", note=[Accessed: 02-December-2023 ]}

BibLaTeX

@online{reference.wolfram_2023_testcreate, organization={Wolfram Research}, title={TestCreate}, year={2023}, url={https://reference.wolfram.com/language/ref/TestCreate.html}, note=[Accessed: 02-December-2023 ]}