forked from robincornelius/libedssharp
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from boston-engineering/db/Make_cmake_V4_bug
Fix for bug in CanOpenNodeExporter_V4.Make_cname
- Loading branch information
Showing
3 changed files
with
64 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using Xunit; | ||
using libEDSsharp; | ||
|
||
namespace Tests | ||
{ | ||
public class ExporterTestsV4 : CanOpenNodeExporter_V4 | ||
{ | ||
[Fact] | ||
public void Test_Make_cname_conversion() | ||
{ | ||
if (Make_cname("axle 0 wheel right controlword") != "axle0WheelRightControlword") | ||
throw (new Exception("Make_cname Conversion error")); | ||
|
||
if (Make_cname("mapped object 4") != "mappedObject4") | ||
throw (new Exception("Make_cname Conversion error")); | ||
|
||
if (Make_cname("COB ID used by RPDO") != "COB_IDUsedByRPDO") | ||
throw (new Exception("Make_cname Conversion error")); | ||
|
||
if (Make_cname("A/D unit offset value (filtered)") != "A_DUnitOffsetValueFiltered") | ||
throw (new Exception("Make_cname Conversion error")); | ||
|
||
if (Make_cname("80 test string") != "_80TestString") | ||
throw (new Exception("Make_cname Conversion error")); | ||
|
||
if (Make_cname("Eighty test string") != "eightyTestString") | ||
throw (new Exception("Make_cname Conversion error")); | ||
|
||
if (Make_cname("A") != "a") | ||
throw (new Exception("Make_cname Conversion error")); | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters