TestEvaluate

TestEvaluate[test]

runs a TestObject.

TestEvaluate[assoc]

runs a test specified by assoc.

TestEvaluate[{test1,test2,}]

runs the list of tests testi.

Details

  • TestEvaluate returns a TestObject.
  • In TestEvaluate[assoc], elements of assoc can include:
  • "Input"Truetest input
    "ExpectedOutput"Trueevaluated expected output
    "ExpectedMessages"{}messages passed to the test
    "SameTest"SameQfunction to compare actual and expected output
    "TestID"Noneunique identifier for the test
    "MemoryConstraint"Infinitymemory (in bytes) the test is allowed to use
    "TimeConstraint"Infinity
  • time (in seconds) the test is allowed to use
  • "MetaInformation"<||>extra information associated with the test
  • TestEvaluate evaluates tests without issuing messages.

Examples

open allclose all

Basic Examples  (1)

Create a test using TestCreate:

Run the test using TestEvaluate:

TestEvaluate will always run a TestObject, even if it is already evaluated:

Evaluate a test by specifying an Association:

Possible Issues  (2)

TestEvaluate will always use a set of defaults if all keys are not specified:

An empty association will still be considered a valid test:

When using an Association, certain properties will be automatically wrapped with HoldForm:

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

Text

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

CMS

Wolfram Language. 2023. "TestEvaluate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TestEvaluate.html.

APA

Wolfram Language. (2023). TestEvaluate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TestEvaluate.html

BibTeX

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

BibLaTeX

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