Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit d2339898 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

new test format (NUnit)

parent 86683a12
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,6 @@ namespace TUGraz.VectoCore.Tests.Integration.DriverStrategy
GraphWriter.Series1Label = "Vecto 3";
}
[Test,
TestCase(60, 20, 0),
TestCase(60, 20, 0.6),
......@@ -51,7 +50,7 @@ namespace TUGraz.VectoCore.Tests.Integration.DriverStrategy
// <s>,<v>,<grad>,<stop>
string.Format(" 0, {0}, {2}, 0", v1, v2, slope),
string.Format("1000, {1}, {2}, 0", v1, v2, slope),
string.Format("1100, {1}, 0, 0", v1, v2, slope)
string.Format("1100, {1}, {2}, 0", v1, v2, slope)
};
System.IO.Directory.CreateDirectory(string.Format(@"Coast_{0}_{1}", v1, v2, slope));
var slopePrefix = "";
......
......@@ -46,6 +46,12 @@ namespace TUGraz.VectoCore.Tests.Integration
return DrivingCycleDataReader.ReadFromStream(cycleData, CycleType.DistanceBased, "", false);
}
public static DrivingCycleData CreateCycleData(string entries)
{
var cycleData = InputDataHelper.InputDataAsStream("<s>,<v>,<grad>,<stop>", entries.Split('\n'));
return DrivingCycleDataReader.ReadFromStream(cycleData, CycleType.DistanceBased, "", false);
}
#region Accelerate
public static readonly string[] CycleAccelerate_20_60_Level = {
......@@ -55,7 +61,6 @@ namespace TUGraz.VectoCore.Tests.Integration
"1000, 60, 0, 0"
};
public static readonly string[] CycleAccelerate_20_60_uphilll_5 = {
// <s>,<v>,<grad>,<stop>
" 0, 20, 5, 0",
......@@ -84,7 +89,6 @@ namespace TUGraz.VectoCore.Tests.Integration
"1000, 60, -25, 0"
};
public static readonly string[] CycleAccelerate_20_60_uphill_15 = {
// <s>,<v>,<grad>,<stop>
" 0, 20, 15, 0",
......@@ -452,7 +456,6 @@ namespace TUGraz.VectoCore.Tests.Integration
" 200, 10, -15, 0"
};
public static readonly string[] CycleDrive_10_uphill_15 = {
// <s>,<v>,<grad>,<stop>
" 0, 10, 15, 0",
......@@ -463,225 +466,211 @@ namespace TUGraz.VectoCore.Tests.Integration
#region Misc
public static readonly string[] CycleDrive_80_Increasing_Slope = {
// <s>,<v>,<grad>,<stop>
" 0, 80, 0, 0",
" 100, 80, 0.25, 0",
" 200, 80, 0.5, 0",
" 300, 80, 0.75, 0",
" 400, 80, 1, 0",
" 500, 80, 1.25, 0",
" 600, 80, 1.5, 0",
" 700, 80, 1.75, 0",
" 800, 80, 2, 0",
" 900, 80, 2.25, 0",
"1000, 80, 2.5, 0",
"1100, 80, 0, 0"
};
public static readonly string[] CycleDrive_50_Increasing_Slope = {
// <s>,<v>,<grad>,<stop>
" 0, 50, 0, 0",
" 100, 50, 0.25, 0",
" 200, 50, 0.5, 0",
" 300, 50, 0.75, 0",
" 400, 50, 1, 0",
" 500, 50, 1.25, 0",
" 600, 50, 1.5, 0",
" 700, 50, 1.75, 0",
" 800, 50, 2, 0",
" 900, 50, 2.25, 0",
"1000, 50, 2.5, 0",
"1100, 50, 0, 0"
};
public static readonly string[] CycleDrive_30_Increasing_Slope = {
// <s>,<v>,<grad>,<stop>
" 0, 30, 0, 0",
" 100, 30, 0.25, 0",
" 200, 30, 0.5, 0",
" 300, 30, 0.75, 0",
" 400, 30, 1, 0",
" 500, 30, 1.25, 0",
" 600, 30, 1.5, 0",
" 700, 30, 1.75, 0",
" 800, 30, 2, 0",
" 900, 30, 2.25, 0",
"1000, 30, 2.5, 0",
"1100, 30, 0, 0"
};
public static readonly string[] CycleDrive_80_Decreasing_Slope = {
// <s>,<v>,<grad>,<stop>
" 0, 80, 0, 0",
" 100, 80, -0.25, 0",
" 200, 80, -0.5, 0",
" 300, 80, -0.75, 0",
" 400, 80, -1, 0",
" 500, 80, -1.25, 0",
" 600, 80, -1.5, 0",
" 700, 80, -1.75, 0",
" 800, 80, -2, 0",
" 900, 80, -2.25, 0",
"1000, 80, -2.5, 0",
"1100, 80, 0, 0"
};
public static readonly string[] CycleDrive_50_Decreasing_Slope = {
// <s>,<v>,<grad>,<stop>
" 0, 50, 0, 0",
" 100, 50, -0.25, 0",
" 200, 50, -0.5, 0",
" 300, 50, -0.75, 0",
" 400, 50, -1, 0",
" 500, 50, -1.25, 0",
" 600, 50, -1.5, 0",
" 700, 50, -1.75, 0",
" 800, 50, -2, 0",
" 900, 50, -2.25, 0",
"1000, 50, -2.5, 0",
"1100, 50, 0, 0"
};
public static readonly string[] CycleDrive_30_Decreasing_Slope = {
// <s>,<v>,<grad>,<stop>
" 0, 30, 0, 0",
" 100, 30, -0.25, 0",
" 200, 30, -0.5, 0",
" 300, 30, -0.75, 0",
" 400, 30, -1, 0",
" 500, 30, -1.25, 0",
" 600, 30, -1.5, 0",
" 700, 30, -1.75, 0",
" 800, 30, -2, 0",
" 900, 30, -2.25, 0",
"1000, 30, -2.5, 0",
"1100, 30, 0, 0"
};
public static readonly string[] CycleDrive_80_Dec_Increasing_Slope = {
// <s>,<v>,<grad>,<stop>
" 0, 80, 0, 0",
" 100, 80, -0.25, 0",
" 200, 80, -0.5, 0",
" 300, 80, -0.75, 0",
" 400, 80, -1, 0",
" 500, 80, -1.25, 0",
" 600, 80, -1.5, 0",
" 700, 80, -1.75, 0",
" 800, 80, -2, 0",
" 900, 80, -2.25, 0",
"1000, 80, -2.5, 0",
"1100, 80, 0, 0",
"1200, 80, 0, 0",
"1300, 80, 0.25, 0",
"1400, 80, 0.5, 0",
"1500, 80, 0.75, 0",
"1600, 80, 1, 0",
"1700, 80, 1.25, 0",
"1800, 80, 1.5, 0",
"1900, 80, 1.75, 0",
"2000, 80, 2, 0",
"2100, 80, 2.25, 0",
"2200, 80, 2.5, 0",
"2300, 80, 0, 0"
};
public static readonly string[] CycleDrive_50_Dec_Increasing_Slope = {
// <s>,<v>,<grad>,<stop>
" 0, 50, 0, 0",
" 50, 50, -0.25, 0",
" 100, 50, -0.5, 0",
" 150, 50, -0.75, 0",
" 200, 50, -1, 0",
" 250, 50, -1.25, 0",
" 300, 50, -1.5, 0",
" 350, 50, -1.75, 0",
" 400, 50, -2, 0",
" 450, 50, -2.25, 0",
" 500, 50, -2.5, 0",
" 550, 50, 0, 0",
" 600, 50, 0, 0",
" 650, 50, 0.25, 0",
" 700, 50, 0.5, 0",
" 750, 50, 0.75, 0",
" 800, 50, 1, 0",
" 850, 50, 1.25, 0",
" 900, 50, 1.5, 0",
" 950, 50, 1.75, 0",
"1000, 50, 2, 0",
"1050, 50, 2.25, 0",
"1100, 50, 2.5, 0",
"1150, 50, 5, 0",
"1200, 50, 0, 0"
};
public static readonly string[] CycleDrive_30_Dec_Increasing_Slope = {
// <s>,<v>,<grad>,<stop>
" 0, 30, 0, 0",
" 50, 30, -0.25, 0",
" 100, 30, -0.5, 0",
" 150, 30, -0.75, 0",
" 200, 30, -1, 0",
" 250, 30, -1.25, 0",
" 300, 30, -1.5, 0",
" 350, 30, -1.75, 0",
" 400, 30, -2, 0",
" 450, 30, -2.25, 0",
" 500, 30, -2.5, 0",
" 550, 30, 0, 0",
" 600, 30, 0, 0",
" 650, 30, 0.25, 0",
" 700, 30, 0.5, 0",
" 750, 30, 0.75, 0",
" 800, 30, 1, 0",
" 850, 30, 1.25, 0",
" 900, 30, 1.5, 0",
" 950, 30, 1.75, 0",
"1000, 30, 2, 0",
"1050, 30, 2.25, 0",
"1100, 30, 2.5, 0",
"1150, 30, 0, 0"
};
public static readonly string[] CycleDecelerateWhileBrake_80_0_level = {
// <s>,<v>,<grad>,<stop>
" 0, 80, 0, 0",
" 990, 65, 0, 0",
"1000, 0, 0, 2"
};
public static readonly string[] CycleAccelerateWhileBrake_80_0_level = {
// <s>,<v>,<grad>,<stop>
" 0, 80, 0, 0",
" 800, 90, 0, 0",
" 950, 80, 0, 0",
"1000, 0, 0, 2"
};
public static readonly string[] CycleAccelerateAtBrake_80_0_level = {
// <s>,<v>,<grad>,<stop>
" 0, 80, 0, 0",
" 505, 90, 0, 0",
" 650, 80, 0, 0",
"1000, 0, 0, 2"
};
public static readonly string[] CycleAccelerateBeforeBrake_80_0_level = {
// <s>,<v>,<grad>,<stop>
" 0, 80, 0, 0",
" 450, 90, 0, 0",
" 650, 80, 0, 0",
"1000, 0, 0, 2"
};
public static readonly string[] CycleDrive_stop_85_stop_85_level = {
// <s>,<v>,<grad>,<stop>
" 0, 0, 0, 2",
"1000, 85, 0, 0",
"2000, 0, 0, 2",
"3000, 85, 0, 0"
};
public const string CycleDrive_80_Increasing_Slope =
// <s>,<v>,<grad>,<stop>
@" 0, 80, 0, 0
100, 80, 0.25, 0
200, 80, 0.5, 0
300, 80, 0.75, 0
400, 80, 1, 0
500, 80, 1.25, 0
600, 80, 1.5, 0
700, 80, 1.75, 0
800, 80, 2, 0
900, 80, 2.25, 0
1000, 80, 2.5, 0
1100, 80, 0, 0";
public const string CycleDrive_50_Increasing_Slope =
// <s>,<v>,<grad>,<stop>
@" 0, 50, 0, 0
100, 50, 0.25, 0
200, 50, 0.5, 0
300, 50, 0.75, 0
400, 50, 1, 0
500, 50, 1.25, 0
600, 50, 1.5, 0
700, 50, 1.75, 0
800, 50, 2, 0
900, 50, 2.25, 0
1000, 50, 2.5, 0
1100, 50, 0, 0";
public const string CycleDrive_30_Increasing_Slope =
// <s>,<v>,<grad>,<stop>
@" 0, 30, 0, 0
100, 30, 0.25, 0
200, 30, 0.5, 0
300, 30, 0.75, 0
400, 30, 1, 0
500, 30, 1.25, 0
600, 30, 1.5, 0
700, 30, 1.75, 0
800, 30, 2, 0
900, 30, 2.25, 0
1000, 30, 2.5, 0
1100, 30, 0, 0";
public const string CycleDrive_80_Decreasing_Slope =
// <s>,<v>,<grad>,<stop>
@" 0, 80, 0, 0
100, 80, -0.25, 0
200, 80, -0.5, 0
300, 80, -0.75, 0
400, 80, -1, 0
500, 80, -1.25, 0
600, 80, -1.5, 0
700, 80, -1.75, 0
800, 80, -2, 0
900, 80, -2.25, 0
1000, 80, -2.5, 0
1100, 80, 0, 0";
public const string CycleDrive_50_Decreasing_Slope =
// <s>,<v>,<grad>,<stop>
@" 0, 50, 0, 0
100, 50, -0.25, 0
200, 50, -0.5, 0
300, 50, -0.75, 0
400, 50, -1, 0
500, 50, -1.25, 0
600, 50, -1.5, 0
700, 50, -1.75, 0
800, 50, -2, 0
900, 50, -2.25, 0
1000, 50, -2.5, 0
1100, 50, 0, 0 ";
public const string CycleDrive_30_Decreasing_Slope =
// <s>,<v>,<grad>,<stop>
@" 0, 30, 0, 0
100, 30, -0.25, 0
200, 30, -0.5, 0
300, 30, -0.75, 0
400, 30, -1, 0
500, 30, -1.25, 0
600, 30, -1.5, 0
700, 30, -1.75, 0
800, 30, -2, 0
900, 30, -2.25, 0
1000, 30, -2.5, 0
1100, 30, 0, 0 ";
public const string CycleDrive_80_Dec_Increasing_Slope =
// <s>,<v>,<grad>,<stop>
@" 0, 80, 0, 0
100, 80, -0.25, 0
200, 80, -0.5, 0
300, 80, -0.75, 0
400, 80, -1, 0
500, 80, -1.25, 0
600, 80, -1.5, 0
700, 80, -1.75, 0
800, 80, -2, 0
900, 80, -2.25, 0
1000, 80, -2.5, 0
1100, 80, 0, 0
1200, 80, 0, 0
1300, 80, 0.25, 0
1400, 80, 0.5, 0
1500, 80, 0.75, 0
1600, 80, 1, 0
1700, 80, 1.25, 0
1800, 80, 1.5, 0
1900, 80, 1.75, 0
2000, 80, 2, 0
2100, 80, 2.25, 0
2200, 80, 2.5, 0
2300, 80, 0, 0 ";
public const string CycleDrive_50_Dec_Increasing_Slope =
// <s>,<v>,<grad>,<stop>
@" 0, 50, 0, 0
50, 50, -0.25, 0
100, 50, -0.5, 0
150, 50, -0.75, 0
200, 50, -1, 0
250, 50, -1.25, 0
300, 50, -1.5, 0
350, 50, -1.75, 0
400, 50, -2, 0
450, 50, -2.25, 0
500, 50, -2.5, 0
550, 50, 0, 0
600, 50, 0, 0
650, 50, 0.25, 0
700, 50, 0.5, 0
750, 50, 0.75, 0
800, 50, 1, 0
850, 50, 1.25, 0
900, 50, 1.5, 0
950, 50, 1.75, 0
1000, 50, 2, 0
1050, 50, 2.25, 0
1100, 50, 2.5, 0
1150, 50, 5, 0
1200, 50, 0, 0 ";
public const string CycleDrive_30_Dec_Increasing_Slope =
// <s>,<v>,<grad>,<stop>
@" 0, 30, 0, 0
50, 30, -0.25, 0
100, 30, -0.5, 0
150, 30, -0.75, 0
200, 30, -1, 0
250, 30, -1.25, 0
300, 30, -1.5, 0
350, 30, -1.75, 0
400, 30, -2, 0
450, 30, -2.25, 0
500, 30, -2.5, 0
550, 30, 0, 0
600, 30, 0, 0
650, 30, 0.25, 0
700, 30, 0.5, 0
750, 30, 0.75, 0
800, 30, 1, 0
850, 30, 1.25, 0
900, 30, 1.5, 0
950, 30, 1.75, 0
1000, 30, 2, 0
1050, 30, 2.25, 0
1100, 30, 2.5, 0
1150, 30, 0, 0";
public const string CycleDecelerateWhileBrake_80_0_level =
// <s>,<v>,<grad>,<stop>
@" 0, 80, 0, 0
990, 65, 0, 0
1000, 0, 0, 2";
public const string CycleAccelerateWhileBrake_80_0_level =
// <s>,<v>,<grad>,<stop>
@" 0, 80, 0, 0
800, 90, 0, 0
950, 80, 0, 0
1000, 0, 0, 2";
public const string CycleAccelerateAtBrake_80_0_level =
// <s>,<v>,<grad>,<stop>
@" 0, 80, 0, 0
505, 90, 0, 0
650, 80, 0, 0
1000, 0, 0, 2";
public const string CycleAccelerateBeforeBrake_80_0_level =
// <s>,<v>,<grad>,<stop>
@" 0, 80, 0, 0
450, 90, 0, 0
650, 80, 0, 0
1000, 0, 0, 2";
public const string CycleDrive_stop_85_stop_85_level =
// <s>,<v>,<grad>,<stop>
@" 0, 0, 0, 2
1000, 85, 0, 0
2000, 0, 0, 2
3000, 85, 0, 0";
#endregion
......
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