~markwright/scalestack/zeromq

« back to all changes in this revision

Viewing changes to ScaleStack/TestModule.cc

  • Committer: Eric Day
  • Date: 2010-02-21 10:36:03 UTC
  • Revision ID: eday@oddments.org-20100221103603-u0agc1fsduqhl728
Initial commit with build system and basic module loading.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Scale Stack
 
3
 *
 
4
 * Copyright (C) 2010 Eric Day (eday@oddments.org)
 
5
 * All rights reserved.
 
6
 *
 
7
 * Use and distribution licensed under the BSD license. See the
 
8
 * COPYING file in the root project directory for full text.
 
9
 */
 
10
 
 
11
/**
 
12
 * @file
 
13
 * @brief Module Tests
 
14
 */
 
15
 
 
16
#include "config.h"
 
17
 
 
18
#include <ScaleStack/TestCommon.h>
 
19
#include <ScaleStack/Module.h>
 
20
 
 
21
TEST_BEGIN(constructor)
 
22
  ScaleStack::Module module("TestModule");
 
23
  assert(module.getName() == "TestModule");
 
24
  assert(module.getPathname() == "");
 
25
  assert(module.getCanonicalName() == "");
 
26
  assert(module.getVersion() == "");
 
27
  assert(module.getAuthor() == "");
 
28
  assert(module.getTitle() == "");
 
29
  assert(module.getLicense() == "");
 
30
  assert(module.getDependencies().size() == 0);
 
31
  assert(module.checkName("TestModule") == true);
 
32
  assert(module.checkName("BadModule") == false);
 
33
TEST_END
 
34
 
 
35
TEST_RUNNER_BEGIN(Module)
 
36
  TEST_RUN(constructor);
 
37
TEST_RUNNER_END