Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 4d4d3001 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

adding testcase showing error in reading and re-calculating hash of tires (if...

adding testcase showing error in reading and re-calculating hash of tires (if the order changes in the input)

(cherry picked from commit e91a148a)
parent d7a62bf3
No related branches found
No related tags found
No related merge requests found
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -132,10 +132,10 @@ namespace VectoHashingTest
Assert.AreEqual(expectedHash, existingHash);
}
[TestCase]
public void TestReadTyres1Index()
[TestCase(@"Testdata\XML\ToHash\vecto_vehicle-sample_3axle1.xml"),
TestCase(@"Testdata\XML\ToHash\vecto_vehicle-sample_3axle1_unsortedAxle.xml")]
public void TestReadTyres1Index(string file)
{
var file = @"Testdata\XML\ToHash\vecto_vehicle-sample_3axle1.xml";
var h = VectoHash.Load(file);
var expectedHash = new[] {
"5074334bb2c090c5e258e9a664f5d19689a3f13d",
......@@ -146,7 +146,7 @@ namespace VectoHashingTest
for (int i = 0; i < expectedHash.Length; i++) {
var existingHash = h.ReadHash(VectoComponents.Tyre, i);
Assert.AreEqual(expectedHash[i], existingHash);
Assert.AreEqual(expectedHash[i], existingHash, $"component index {i}");
}
}
......@@ -171,10 +171,10 @@ namespace VectoHashingTest
"index exceeds number of components found! index: 3, #components: 3");
}
[TestCase]
public void TestComputeTyres1Index()
[TestCase(@"Testdata\XML\ToHash\vecto_vehicle-sample_3axle1.xml"),
TestCase(@"Testdata\XML\ToHash\vecto_vehicle-sample_3axle1_unsortedAxle.xml")]
public void TestComputeTyres1Index(string file)
{
var file = @"Testdata\XML\ToHash\vecto_vehicle-sample_3axle1.xml";
var h = VectoHash.Load(file);
var hash1 = h.ComputeHash(VectoComponents.Tyre, 1);
......
......@@ -196,6 +196,9 @@
<Content Include="Testdata\XML\ToHash\vecto_gearbox-input_nodata.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Testdata\XML\ToHash\vecto_vehicle-sample_3axle1_unsortedAxle.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Testdata\XML\ToHash\vecto_vehicle-sample_3axle1.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment