Mercurial > hg > aimc
comparison src/Modules/Profile/ModuleSlice_unittest.cc @ 17:f4e712d41321
-Added basic support for unit tests using gtest
-Updated lint scripts to exclude header guard problems
-Made everything lint-friendly
-Added a trivial script to build the Doxygen documentation
author | tomwalters |
---|---|
date | Sat, 20 Feb 2010 21:03:57 +0000 |
parents | |
children | c5f5e9569863 |
comparison
equal
deleted
inserted
replaced
16:2a5354042241 | 17:f4e712d41321 |
---|---|
1 // Copyright 2010, Thomas Walters | |
2 // | |
3 // AIM-C: A C++ implementation of the Auditory Image Model | |
4 // http://www.acousticscale.org/AIMC | |
5 // | |
6 // This program is free software: you can redistribute it and/or modify | |
7 // it under the terms of the GNU General Public License as published by | |
8 // the Free Software Foundation, either version 3 of the License, or | |
9 // (at your option) any later version. | |
10 // | |
11 // This program is distributed in the hope that it will be useful, | |
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 // GNU General Public License for more details. | |
15 // | |
16 // You should have received a copy of the GNU General Public License | |
17 // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | |
19 /*! | |
20 * \author Thomas Walters <tom@acousticscale.org> | |
21 * \date created 2010/02/20 | |
22 * \version \$Id$ | |
23 */ | |
24 | |
25 #include <boost/scoped_ptr.hpp> | |
26 #include <gtest/gtest.h> | |
27 | |
28 #include "Support/Parameters.h" | |
29 #include "Modules/Profile/ModuleSlice.h" | |
30 | |
31 namespace aimc { | |
32 using boost::scoped_ptr; | |
33 class ModuleSliceTest : public ::testing::Test { | |
34 protected: | |
35 virtual void SetUp() { | |
36 slice_.reset(new ModuleSlice(¶meters_)); | |
37 } | |
38 | |
39 // virtual void TearDown() {} | |
40 | |
41 scoped_ptr<ModuleSlice> slice_; | |
42 Parameters parameters_; | |
43 }; | |
44 | |
45 TEST_F(ModuleSliceTest, SetsDefaultParameters) { | |
46 EXPECT_EQ(false, parameters_.GetBool("slice.temporal")); | |
47 EXPECT_EQ(true, parameters_.GetBool("slice.all")); | |
48 EXPECT_EQ(0, parameters_.GetInt("slice.lower_index")); | |
49 EXPECT_EQ(1000, parameters_.GetInt("slice.upper_index")); | |
50 EXPECT_EQ(false, parameters_.GetBool("slice.normalize")); | |
51 } | |
52 | |
53 TEST_F(ModuleSliceTest, DoesSomethingElse) { | |
54 } | |
55 } // namespace aimc |