OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.tests.HeavyDBAsserts 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 HeavyDBAsserts.java.

Member Function Documentation

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

Definition at line 23 of file HeavyDBAsserts.java.

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

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

+ Here is the caller graph for this function:

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

Definition at line 28 of file HeavyDBAsserts.java.

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

Definition at line 33 of file HeavyDBAsserts.java.

References com.mapd.tests.HeavyDBAsserts.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)
string name
Definition: setup.in.py:72

+ Here is the call graph for this function:

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

Definition at line 39 of file HeavyDBAsserts.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: