-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiagnose-skip-samples-ub.patch
More file actions
54 lines (54 loc) · 2.49 KB
/
Copy pathdiagnose-skip-samples-ub.patch
File metadata and controls
54 lines (54 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff --git a/core/opendaq/reader/tests/test_stream_reader.cpp b/core/opendaq/reader/tests/test_stream_reader.cpp
index 50c68c0b..b912eea7 100644
--- a/core/opendaq/reader/tests/test_stream_reader.cpp
+++ b/core/opendaq/reader/tests/test_stream_reader.cpp
@@ -1748,16 +1748,20 @@ TYPED_TEST(StreamReaderTest, SkipSamplesOnePacket)
{
for (size_t i = 0; i < 10; ++i)
{
- ASSERT_EQ(firstBatchSamples[i], TypeParam(typename TypeParam::Type(i * 11.1)));
- ASSERT_EQ(secondBatchSamples[i], TypeParam(typename TypeParam::Type((40 + i) * 11.1)));
+ TypeParam expectedFirst = TypeParam(typename TypeParam::Type(i * 11.1));
+ TypeParam expectedSecond = TypeParam(typename TypeParam::Type((40 + i) * 11.1));
+ ASSERT_EQ(firstBatchSamples[i], expectedFirst);
+ ASSERT_EQ(secondBatchSamples[i], expectedSecond);
}
}
else
{
for (size_t i = 0; i < 10; ++i)
{
- ASSERT_EQ(firstBatchSamples[i], (TypeParam)(i * 11.1));
- ASSERT_EQ(secondBatchSamples[i], (TypeParam) ((40 + i) * 11.1));
+ TypeParam expectedFirst = (TypeParam)(i * 11.1);
+ TypeParam expectedSecond = (TypeParam)((40 + i) * 11.1);
+ ASSERT_EQ(firstBatchSamples[i], expectedFirst);
+ ASSERT_EQ(secondBatchSamples[i], expectedSecond);
}
}
}
@@ -1819,16 +1823,20 @@ TYPED_TEST(StreamReaderTest, SkipSamplesBetweenPackets)
{
for (size_t i = 0; i < 10; ++i)
{
- ASSERT_EQ(firstBatchSamples[i], TypeParam(typename TypeParam::Type(i * 11.1)));
- ASSERT_EQ(secondBatchSamples[i], TypeParam(typename TypeParam::Type((40 + i) * 11.1)));
+ TypeParam expectedFirst = TypeParam(typename TypeParam::Type(i * 11.1));
+ TypeParam expectedSecond = TypeParam(typename TypeParam::Type((40 + i) * 11.1));
+ ASSERT_EQ(firstBatchSamples[i], expectedFirst);
+ ASSERT_EQ(secondBatchSamples[i], expectedSecond);
}
}
else
{
for (size_t i = 0; i < 10; ++i)
{
- ASSERT_EQ(firstBatchSamples[i], (TypeParam) (i * 11.1));
- ASSERT_EQ(secondBatchSamples[i], (TypeParam) ((40 + i) * 11.1));
+ TypeParam expectedFirst = (TypeParam)(i * 11.1);
+ TypeParam expectedSecond = (TypeParam)((40 + i) * 11.1);
+ ASSERT_EQ(firstBatchSamples[i], expectedFirst);
+ ASSERT_EQ(secondBatchSamples[i], expectedSecond);
}
}
}