0d5329ca67eff6acdc755790ed9e0ef2ecc7e1ba
[soc.git] / TestUtil / test_helper.py
1 # Verifies the given values via the requested operation
2 # Arguments:
3 # p (Prefix): Appended to the front of the assert statement
4 # e (Expected): The expected value
5 # o (Output): The output result
6 # op (Operation): (0 => ==), (1 => !=)
7 def check(p, o, e, op):
8 if(op == 0):
9 assert o == e, p + " Output " + str(o) + " Expected " + str(e)
10 else:
11 assert o != e, p + " Output " + str(o) + " Not Expecting " + str(e)