Function to test if object returning/printing a string matches with a specified string

expect_complexity_class(object, complexity.class)

Arguments

object

The argument which returns a string to be tested against the expected string

complexity.class

A string denoting the expected complexity class

Value

null for expected complexity, else throws error.

Details

For more information regarding its implementation or functionality/usage, please check https://anirban166.github.io//Testing-functions/

Examples

# Testing for equality of two string objects (denoting complexity classes): expect_complexity_class("linear", "linear")