IODA Bundle
TestStar.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 1996-2012 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 /// \file UnitTest.h
12 ///
13 /// @author Piotr Kuchta, ECMWF, May 2009
14 
15 #include "odc/core/MetaData.h"
16 #include "odc/Select.h"
17 
18 #include "TestCase.h"
19 
20 
21 using namespace std;
22 using namespace eckit;
23 using namespace odc;
24 
25 /// UnitTest syntax: select *@odb_table from "file.oda";
26 ///
27 static void test()
28 {
29  const std::string SELECT = "select *@hdr from \"2000010106.odb\";";
30 
31  odc::Select oda(SELECT);
32 
33  odc::Select::iterator it = oda.begin();
34  ASSERT("hdr has 27 columns excluding @LINKs." && it->columns().size() == 27);
35 }
36 
37 
38 
39 static void setUp(){}
40 static void tearDown(){}
41 
42 SIMPLE_TEST(Star)
void oda
#define SIMPLE_TEST(name)
Definition: TestCase.h:66
static void tearDown()
Definition: TestStar.cc:40
static void test()
Definition: TestStar.cc:27
static void setUp()
Definition: TestStar.cc:39
const core::MetaData & columns() const
Definition: IteratorProxy.h:94
Definition: ColumnInfo.h:23
Definition: encode.cc:30