2 Dimensional Ising Model
Simulate the change in energy and magnetization in a ferro magnet
Loading...
Searching...
No Matches
testlib.cpp File Reference

Implementation of the testing library. More...

#include "testlib.hpp"

Go to the source code of this file.

Functions

void details::m_assert (bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)
 Test an expression, confirm that test is ok, or abort execution.
 

Detailed Description

Implementation of the testing library.

Author
Cory Alexander Balaton (coryab)
Janita Ovidie Sandtrøen Willumsen (janitaws)
Version
1.0
Bug:
No known bugs

Definition in file testlib.cpp.

Function Documentation

◆ m_assert()

void details::m_assert ( bool  expr,
std::string  expr_str,
std::string  func,
std::string  file,
int  line,
std::string  msg 
)

Test an expression, confirm that test is ok, or abort execution.

This function takes in an expression and prints an OK message if it's true, or it prints a fail message and aborts execution if it fails.

Parameters
exprThe expression to be evaluated
expr_strThe stringified version of the expression
funcThe function name of the caller
fileThe file of the caller
lineThe line number where this function is called from
msgThe message to be displayed

Definition at line 15 of file testlib.cpp.