OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.mapd.tests.MapdAsserts Class Reference

Classes

interface  TestRun
 

Static Public Member Functions

static void assertEqual (Object a, Object b)
 
static void assertEqual (int a, int b)
 
static void assertEqual (String name, TDashboard db)
 
static void shouldThrowException (String msg, TestRun test)
 

Detailed Description

Definition at line 20 of file MapdAsserts.java.

Member Function Documentation

static void com.mapd.tests.MapdAsserts.assertEqual ( Object  a,
Object  b 
)
inlinestatic

Definition at line 23 of file MapdAsserts.java.

Referenced by com.mapd.tests.MapdAsserts.assertEqual().

23  {
24  if (a.equals(b)) return;
25  throw new RuntimeException("assert failed:\nExpected: " + a + "\n got: " + b);
26  }

+ Here is the caller graph for this function:

static void com.mapd.tests.MapdAsserts.assertEqual ( int  a,
int  b 
)
inlinestatic

Definition at line 28 of file MapdAsserts.java.

28  {
29  if (a == b) return;
30  throw new RuntimeException("assert failed:\nExpected: " + a + "\n got: " + b);
31  }
static void com.mapd.tests.MapdAsserts.assertEqual ( String  name,
TDashboard  db 
)
inlinestatic

Definition at line 33 of file MapdAsserts.java.

References com.mapd.tests.MapdAsserts.assertEqual().

33  {
34  assertEqual(name, db.getDashboard_name());
35  assertEqual(name + "_hash", db.getImage_hash());
36  assertEqual(name + "_meta", db.getDashboard_metadata());
37  }
static void assertEqual(Object a, Object b)

+ Here is the call graph for this function:

static void com.mapd.tests.MapdAsserts.shouldThrowException ( String  msg,
TestRun  test 
)
inlinestatic

Definition at line 39 of file MapdAsserts.java.

39  {
40  boolean failed;
41  try {
42  test.run();
43  failed = true;
44  } catch (Exception e) {
45  failed = false;
46  }
47 
48  if (failed) {
49  throw new RuntimeException(msg);
50  }
51  }

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