annotate trunk/src/Modules/Profile/ModuleSlice_unittest.cc @ 706:f8e90b5d85fd tip

Delete CARFAC code from this repository. It has been moved to https://github.com/google/carfac Please email me with your github username to get access. I've also created a new mailing list to discuss CARFAC development: https://groups.google.com/forum/#!forum/carfac-dev
author ronw@google.com
date Thu, 18 Jul 2013 20:56:51 +0000
parents 30dde71d0230
children
rev   line source
tomwalters@289 1 // Copyright 2010, Thomas Walters
tomwalters@289 2 //
tomwalters@289 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@289 4 // http://www.acousticscale.org/AIMC
tomwalters@289 5 //
tomwalters@318 6 // Licensed under the Apache License, Version 2.0 (the "License");
tomwalters@318 7 // you may not use this file except in compliance with the License.
tomwalters@318 8 // You may obtain a copy of the License at
tomwalters@289 9 //
tomwalters@318 10 // http://www.apache.org/licenses/LICENSE-2.0
tomwalters@289 11 //
tomwalters@318 12 // Unless required by applicable law or agreed to in writing, software
tomwalters@318 13 // distributed under the License is distributed on an "AS IS" BASIS,
tomwalters@318 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tomwalters@318 15 // See the License for the specific language governing permissions and
tomwalters@318 16 // limitations under the License.
tomwalters@289 17
tomwalters@289 18 /*!
tomwalters@289 19 * \author Thomas Walters <tom@acousticscale.org>
tomwalters@289 20 * \date created 2010/02/20
tomwalters@289 21 * \version \$Id$
tomwalters@289 22 */
tomwalters@289 23
tomwalters@289 24 #include <boost/scoped_ptr.hpp>
tomwalters@289 25 #include <gtest/gtest.h>
tomwalters@289 26
tomwalters@289 27 #include "Support/Parameters.h"
tomwalters@289 28 #include "Modules/Profile/ModuleSlice.h"
tomwalters@289 29
tomwalters@289 30 namespace aimc {
tomwalters@289 31 using boost::scoped_ptr;
tomwalters@289 32 class ModuleSliceTest : public ::testing::Test {
tomwalters@289 33 protected:
tomwalters@289 34 virtual void SetUp() {
tomwalters@289 35 slice_.reset(new ModuleSlice(&parameters_));
tomwalters@289 36 }
tomwalters@289 37
tomwalters@289 38 // virtual void TearDown() {}
tomwalters@289 39
tomwalters@289 40 scoped_ptr<ModuleSlice> slice_;
tomwalters@289 41 Parameters parameters_;
tomwalters@289 42 };
tomwalters@289 43
tomwalters@289 44 TEST_F(ModuleSliceTest, SetsDefaultParameters) {
tomwalters@289 45 EXPECT_EQ(false, parameters_.GetBool("slice.temporal"));
tomwalters@289 46 EXPECT_EQ(true, parameters_.GetBool("slice.all"));
tomwalters@289 47 EXPECT_EQ(0, parameters_.GetInt("slice.lower_index"));
tomwalters@289 48 EXPECT_EQ(1000, parameters_.GetInt("slice.upper_index"));
tomwalters@289 49 EXPECT_EQ(false, parameters_.GetBool("slice.normalize"));
tomwalters@289 50 }
tomwalters@289 51
tomwalters@289 52 TEST_F(ModuleSliceTest, DoesSomethingElse) {
tomwalters@289 53 }
tomwalters@289 54 } // namespace aimc