mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4683 clang-format on all files in ApplicationCode
This commit is contained in:
@@ -3,17 +3,17 @@
|
||||
// Copyright (C) 2011- Statoil ASA
|
||||
// Copyright (C) 2013- Ceetron Solutions AS
|
||||
// Copyright (C) 2011-2012 Ceetron AS
|
||||
//
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -22,54 +22,53 @@
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST(RigActiveCellInfo, BasicTest)
|
||||
TEST( RigActiveCellInfo, BasicTest )
|
||||
{
|
||||
RigActiveCellInfo rigActiveCellInfo;
|
||||
|
||||
size_t globalActiveCellCount = 10;
|
||||
rigActiveCellInfo.setReservoirCellCount(globalActiveCellCount);
|
||||
rigActiveCellInfo.setReservoirCellCount( globalActiveCellCount );
|
||||
|
||||
for (size_t i = 0; i < globalActiveCellCount; i++)
|
||||
for ( size_t i = 0; i < globalActiveCellCount; i++ )
|
||||
{
|
||||
EXPECT_TRUE(rigActiveCellInfo.cellResultIndex(i) == cvf::UNDEFINED_SIZE_T);
|
||||
EXPECT_FALSE(rigActiveCellInfo.isActive(i));
|
||||
EXPECT_TRUE( rigActiveCellInfo.cellResultIndex( i ) == cvf::UNDEFINED_SIZE_T );
|
||||
EXPECT_FALSE( rigActiveCellInfo.isActive( i ) );
|
||||
}
|
||||
|
||||
rigActiveCellInfo.setCellResultIndex(3, 1);
|
||||
EXPECT_TRUE(rigActiveCellInfo.cellResultIndex(3) == 1);
|
||||
rigActiveCellInfo.setCellResultIndex( 3, 1 );
|
||||
EXPECT_TRUE( rigActiveCellInfo.cellResultIndex( 3 ) == 1 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST(RigActiveCellInfo, GridCellCounts)
|
||||
TEST( RigActiveCellInfo, GridCellCounts )
|
||||
{
|
||||
{
|
||||
RigActiveCellInfo rigActiveCellInfo;
|
||||
rigActiveCellInfo.setGridCount(3);
|
||||
rigActiveCellInfo.setGridActiveCellCounts(0, 0);
|
||||
rigActiveCellInfo.setGridActiveCellCounts(1, 1);
|
||||
rigActiveCellInfo.setGridActiveCellCounts(2, 2);
|
||||
rigActiveCellInfo.setGridCount( 3 );
|
||||
rigActiveCellInfo.setGridActiveCellCounts( 0, 0 );
|
||||
rigActiveCellInfo.setGridActiveCellCounts( 1, 1 );
|
||||
rigActiveCellInfo.setGridActiveCellCounts( 2, 2 );
|
||||
rigActiveCellInfo.computeDerivedData();
|
||||
|
||||
EXPECT_TRUE(rigActiveCellInfo.reservoirActiveCellCount() == 3);
|
||||
EXPECT_TRUE( rigActiveCellInfo.reservoirActiveCellCount() == 3 );
|
||||
}
|
||||
|
||||
{
|
||||
RigActiveCellInfo rigActiveCellInfo;
|
||||
rigActiveCellInfo.setGridCount(3);
|
||||
rigActiveCellInfo.setGridActiveCellCounts(0, 3 );
|
||||
rigActiveCellInfo.setGridActiveCellCounts(1, 4 );
|
||||
rigActiveCellInfo.setGridActiveCellCounts(2, 5 );
|
||||
rigActiveCellInfo.setGridCount( 3 );
|
||||
rigActiveCellInfo.setGridActiveCellCounts( 0, 3 );
|
||||
rigActiveCellInfo.setGridActiveCellCounts( 1, 4 );
|
||||
rigActiveCellInfo.setGridActiveCellCounts( 2, 5 );
|
||||
rigActiveCellInfo.computeDerivedData();
|
||||
|
||||
EXPECT_TRUE(rigActiveCellInfo.reservoirActiveCellCount() == 12);
|
||||
EXPECT_TRUE( rigActiveCellInfo.reservoirActiveCellCount() == 12 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user