Skip to content

Commit

Permalink
Some cleanup in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yurii-litvinov committed Dec 9, 2015
1 parent 350518f commit eb6b9e5
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 175 deletions.
45 changes: 0 additions & 45 deletions tests/readerWriterTest/data.h

This file was deleted.

25 changes: 0 additions & 25 deletions tests/readerWriterTest/main.cpp

This file was deleted.

30 changes: 0 additions & 30 deletions tests/readerWriterTest/reader.h

This file was deleted.

32 changes: 0 additions & 32 deletions tests/readerWriterTest/readerWriterTest.pro

This file was deleted.

31 changes: 0 additions & 31 deletions tests/readerWriterTest/writer.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/tests.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ SUBDIRS = \
thirdparty \
trikKernelTests \
trikScriptRunnerTests \
readerWriterTest \

thirdparty.file = thirdparty/gmock-1.6.0/gmock.pro

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License. */

#include "bufferedVarTest.h"
#include "synchronizedVarTest.h"

#include <trikKernel/synchronizedVar.h>

#include <QtCore/QList>
Expand All @@ -26,7 +27,7 @@ struct Point
int y;
};

TEST_F(BufferedVarTest, structTest)
TEST_F(SynchronizedVarTest, structTest)
{
SynchronizedVar<Point> var;
var->x = 10;
Expand All @@ -42,9 +43,9 @@ TEST_F(BufferedVarTest, structTest)
EXPECT_EQ(20, var.get().x);
}

TEST_F(BufferedVarTest, listTest)
TEST_F(SynchronizedVarTest, listTest)
{
BufferedVar<QList<Point>> list;
SynchronizedVar<QList<Point>> list;
EXPECT_TRUE(list.get().isEmpty());

const Point point{10, 10};
Expand All @@ -58,7 +59,7 @@ TEST_F(BufferedVarTest, listTest)
EXPECT_EQ(10, list.get().at(0).x);
}

TEST_F(BufferedVarTest, resetTest)
TEST_F(SynchronizedVarTest, resetTest)
{
SynchronizedVar<QList<Point>> list;
list->append({10, 10});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

namespace tests {

/// Test fixture for BufferedVar class.
class BufferedVarTest : public testing::Test
/// Test fixture for SynchronizedVar class.
class SynchronizedVarTest : public testing::Test
{
};

Expand Down
4 changes: 2 additions & 2 deletions tests/trikKernelTests/trikKernelTests.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ include(../../global.pri)
include(../common.pri)

HEADERS += \
$$PWD/bufferedVarTest.h \
$$PWD/synchronizedVarTest.h \

SOURCES += \
$$PWD/bufferedVarTest.cpp \
$$PWD/synchronizedVarTest.cpp \

implementationIncludes(trikKernel)
links(trikKernel)
4 changes: 2 additions & 2 deletions vera++/scripts/rules/Ownership.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ proc CheckOwnership { fileName } {
set lineCount 1
set previousComment ""
foreach line [getAllLines $fileName] {
if { [regexp {.*\* [\w]*;} $line] } {
if { [regexp {^\t+[a-zA-Z<>& ]*\* [\w]*;} $line] } {
report $fileName $lineCount "'*' shall be attached to identifier, not type"
}

if { [regexp {.* \*[\w]*;} $line] } {
if { [regexp {^\t+[a-zA-Z<>& ]* \*[\w]*;} $line] } {
if { ![regexp {ownership} [string tolower $line] ] && ![regexp {ownership} [string tolower $previousComment] ] } {
report $fileName $lineCount "Raw pointers must have a comment with ownership information - does object have ownership over pointed object or not (so will it delete pointed object itself or not)"
}
Expand Down

0 comments on commit eb6b9e5

Please sign in to comment.