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 fbae2900 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

added some tests for driver strategy

parent 3df2353a
No related branches found
No related tags found
No related merge requests found
......@@ -36,27 +36,182 @@ namespace TUGraz.VectoCore.Tests.Integration.DriverStrategy
// <s>,<v>,<grad>,<stop>
" 0, 0, 0, 2",
" 0, 85, 0, 0",
"900, 85, 0, 0",
"1000, 85, 0, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Accelerate_0_85_level.vmod").Run();
}
var run = CreatePowerTrain(cycle, "DriverStrategy_Accelerate_0_85_level.vmod");
[TestMethod]
public void Accelerate_0_85_uphill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 0, 0, 2",
" 0, 85, 5, 0",
"1000, 85, 5, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Accelerate_0_85_uphill.vmod").Run();
}
run.Run();
[TestMethod]
public void Accelerate_0_85_downhill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 0, 0, 2",
" 0, 85, -5, 0",
"1000, 85, -5, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Accelerate_0_85_downhill.vmod").Run();
}
[TestMethod]
public void Accelerate_80_0_level()
public void Accelerate_0_85_steep_uphill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 0, 0, 2",
" 0, 85, 25, 0",
"1000, 85, 25, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Accelerate_0_85_steep_uphill.vmod").Run();
}
[TestMethod]
public void Accelerate_0_85_steep_downhill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 0, 0, 2",
" 0, 85, -25, 0",
"1000, 85, -25, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Accelerate_0_85_steep_downhill.vmod").Run();
}
[TestMethod]
public void Accelerate_stop_0_85_level()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 0, 0, 2",
" 0, 85, 0, 0",
"1000, 85, 0, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Accelerate_stop_0_85_level.vmod").Run();
}
[TestMethod]
public void Decelerate_80_0_level()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 80, 0, 0",
"500, 0, 0, 0",
"1000, 0, 0, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Decelerate_80_0_level.vmod").Run();
}
var run = CreatePowerTrain(cycle, "DriverStrategy_Accelerate_80_0_level.vmod");
[TestMethod]
public void Decelerate_80_0_uphill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 80, 5, 0",
"1000, 0, 5, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Decelerate_80_0_uphill.vmod").Run();
}
run.Run();
[TestMethod]
public void Decelerate_80_0_downhill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 80, -5, 0",
" 500, 0, -5, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Decelerate_80_0_downhill.vmod").Run();
}
[TestMethod]
public void Decelerate_80_0_steep_uphill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 80, 25, 0",
"1000, 0, 25, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Decelerate_80_0_steep_uphill.vmod").Run();
}
[TestMethod]
public void Decelerate_80_0_steep_downhill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 80, -25, 0",
"1000, 0, -25, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Decelerate_80_0_steep_downhill.vmod").Run();
}
[TestMethod]
public void Drive_80_level()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 80, 0, 0",
"1000, 80, 0, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Drive_80_level.vmod").Run();
}
[TestMethod]
public void Drive_80_uphill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 80, 5, 0",
"1000, 80, 5, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Drive_80_uphill.vmod").Run();
}
[TestMethod]
public void Drive_80_downhill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 80, -5, 0",
" 1000, 80, -5, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Drive_80_downhill.vmod").Run();
}
[TestMethod]
public void Drive_80_steep_downhill()
{
var cycle = CreateCycleData(new[] {
// <s>, <v>, <grad>, <stop>
" 0, 80, -25, 0",
" 500, 80, -25, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Drive_80_steep_downhill.vmod").Run();
}
[TestMethod]
public void Drive_80_steep_uphill()
{
var cycle = CreateCycleData(new[] {
// <s>,<v>,<grad>,<stop>
" 0, 80, 25, 0",
" 500, 80, 25, 0",
});
CreatePowerTrain(cycle, "DriverStrategy_Drive_80_steep_uphill.vmod").Run();
}
// ===============================
......
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