~ubuntu-branches/debian/stretch/openbabel/stretch

« back to all changes in this revision

Viewing changes to test/bond.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-07-22 23:54:58 UTC
  • mfrom: (3.1.10 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080722235458-3o606czluviz4akx
Tags: 2.2.0-2
* Upload to unstable.
* debian/control: Updated descriptions.
* debian/patches/gauss_cube_format.patch: New patch, makes the 
  gaussian cube format available again.
* debian/rules (DEB_DH_MAKESHLIBS_ARGS_libopenbabel3): Removed.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Likewise.
* debian/libopenbabel3.install: Adjust formats directory to single 
  version hierarchy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**********************************************************************
 
2
bond.cpp - Unit tests for Open Babel OBBond class
 
3
 
 
4
Copyright (C) 2005-2006 Geoffrey R. Hutchison
 
5
 
 
6
This file is part of the Open Babel project.
 
7
For more information, see <http://openbabel.sourceforge.net/>
 
8
 
 
9
This program is free software; you can redistribute it and/or modify
 
10
it under the terms of the GNU General Public License as published by
 
11
the Free Software Foundation version 2 of the License.
 
12
 
 
13
This program is distributed in the hope that it will be useful,
 
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
GNU General Public License for more details.
 
17
***********************************************************************/
 
18
 
 
19
// used to set import/export for Cygwin DLLs
 
20
#ifdef WIN32
 
21
#define USING_OBDLL
 
22
#endif
 
23
 
 
24
#include <openbabel/babelconfig.h>
 
25
#include <openbabel/mol.h>
 
26
#include <openbabel/obconversion.h>
 
27
 
 
28
#include <stdio.h>
 
29
#include <iostream>
 
30
 
 
31
using namespace std;
 
32
using namespace OpenBabel;
 
33
 
 
34
int main(int argc,char *argv[])
 
35
{
 
36
  // turn off slow sync with C-style output (we don't use it anyway).
 
37
  std::ios::sync_with_stdio(false);
 
38
 
 
39
  if (argc != 1)
 
40
    {
 
41
      cout << "Usage: bond" << endl;
 
42
      cout << " Unit tests for OBBond " << endl;
 
43
      return(-1);
 
44
    }
 
45
 
 
46
  cout << "# Unit tests for OBBond \n";
 
47
 
 
48
  // the number of tests for "prove"
 
49
  cout << "1..3\n";
 
50
 
 
51
  cout << "ok 1\n"; // for loading tests
 
52
 
 
53
  // OBBond isolation tests (no connection to residue, molecule...)
 
54
 
 
55
  OBAtom emptyAtom, begin1, end1;
 
56
  OBBond emptyBond, bond1;
 
57
  cout << "ok 2\n"; // constructors work OK
 
58
 
 
59
  bond1.SetBegin(&begin1);
 
60
  bond1.SetEnd(&end1);
 
61
  cout << "ok 4\n";
 
62
 
 
63
  return(0);
 
64
}
 
65