MLIR 22.0.0git
mlir::Tester Class Reference

This class is used to keep track of the testing environment of the tool. More...

#include "mlir/Reducer/Tester.h"

Public Types

enum class  Interestingness { True , False , Untested }

Public Member Functions

 Tester ()=default
 Tester (const Tester &)=default
 Tester (StringRef testScript, ArrayRef< std::string > testScriptArgs)
std::pair< Interestingness, size_t > isInteresting (ModuleOp module) const
 Runs the interestingness testing script on a MLIR test case file.
Interestingness isInteresting (StringRef testCase) const
 Return whether the file in the given path is interesting.
void setTestScript (StringRef script)
void setTestScriptArgs (ArrayRef< std::string > args)

Detailed Description

This class is used to keep track of the testing environment of the tool.

It contains a method to run the interestingness testing script on a MLIR test case file.

Definition at line 31 of file Tester.h.

Member Enumeration Documentation

◆ Interestingness

enum class mlir::Tester::Interestingness
strong
Enumerator
True 
False 
Untested 

Definition at line 33 of file Tester.h.

Constructor & Destructor Documentation

◆ Tester() [1/3]

mlir::Tester::Tester ( )
default

Referenced by Tester().

◆ Tester() [2/3]

mlir::Tester::Tester ( const Tester & )
default

References Tester().

◆ Tester() [3/3]

Tester::Tester ( StringRef testScript,
ArrayRef< std::string > testScriptArgs )

Definition at line 23 of file Tester.cpp.

Member Function Documentation

◆ isInteresting() [1/2]

std::pair< Tester::Interestingness, size_t > Tester::isInteresting ( ModuleOp module) const

Runs the interestingness testing script on a MLIR test case file.

Returns true if the interesting behavior is present in the test case or false otherwise.

Definition at line 27 of file Tester.cpp.

References False, isInteresting(), and mlir::verify().

Referenced by findOptimal(), and isInteresting().

◆ isInteresting() [2/2]

Tester::Interestingness Tester::isInteresting ( StringRef testCase) const

Return whether the file in the given path is interesting.

Runs the interestingness testing script on a MLIR test case file.

Returns true if the interesting behavior is present in the test case or false otherwise.

Definition at line 60 of file Tester.cpp.

References False, result, and True.

◆ setTestScript()

void mlir::Tester::setTestScript ( StringRef script)
inline

Definition at line 52 of file Tester.h.

◆ setTestScriptArgs()

void mlir::Tester::setTestScriptArgs ( ArrayRef< std::string > args)
inline

Definition at line 53 of file Tester.h.


The documentation for this class was generated from the following files: