Support of TestCaseData NUnit Class in CodePorting.Native Cs2Cpp 19.5

Share on FacebookTweet about this on TwitterShare on LinkedIn

Guys, CodePorting is glad to announce new version CodePorting.Native Cs2Cpp 19.5. For those new to CodePorting.Native Cs2Cpp, it is a leading code porting application in the market for C# to C++ conversion. You know unit testing is a very important aspect of software development. And you would be excited to know that CodePorting.Native Cs2Cpp supports porting of Unit Test from C# project to C++, using NUnit and XUnit frameworks for C++ language. We extend the unit tests porting feature by adding TestCaseData NUnit Class porting support in the latest release along with many other improvements. Please check what else is available in the new release.

TestCaseData NUnit Class

CodePorting.Native Cs2Cpp ports C# language-specific constructs to the best-matched C++ equivalents. For unit tests porting it uses NUnit and XUnit frameworks to C++ and run tests on ported code. Now, TestCaseData NUnit class porting is supported in the new version.

Let us demonstrate how NUnit TestCaseData class C# code migrates to native C++. You can port your C# project to the C++, either using command line option or GUI option.

C# Source Code

Ported Code

C++ Header

C++ Source Code

generate_enum_descriptions Porter Option

We have introduced a new porter option “generate_enum_descriptions” that enables passing System.ComponentModel.Description attribute value to the ported C++ code. It accepts Boolean value, default is False. The sample Configuration file looks like:

<porter>
    <opt name="option_name_1" value="option_value_1"/>
    <opt name="option_name_2" value="option_value_2" attribute1="attribute1_value"/>
    <opt name="option_name_3">Some text</opt>
   <opt name="generate_enum_descriptions" value="true"/>
    ...
</porter>

Improvements and Fixes

These are the new features included in this regular monthly release:

  • Bitwise operators are provided for some enums from the library.
  • Parsing of numeric enum values are supported by Enum::Parse() methods family.
  • Error is fixed when writing zero length string to XmlTextWriter.
  • Operator overload lookup is fixed in porter for some cases.
  • Conversion from user class to nullable wrapper is fixed in assignment operator.
  • XmlDocument::CreateAttribute is fixed for the case with XML namespace passed.
  • Remaining references to boost.regex are removed from the library.
  • Some code smell issues reported by static analyser are fixed.
  • Enum::GetName() is fixed for boxed flag enum values.
  • Some clang warnings are fixed in ported code and library headers.
  • Region::Intersect() method is fixed for the case of two similar regions.
  • OutOfMemory exception is fixed when using PathGradientBrush.
  • Assertion fault crash is fixed when drawing empty GraphicsPath with customized pen.
  • Some Skia internals are exposed for internal use only.
  • Porting of Assert.DoesNotThrow() is fixed.
  • Some cases of regex matching against empty string are fixed.

Start a Free Trial Today

Start a free trial today – all you need is to sign up with the codeporting.com. Once you have signed up, you are ready to try the CodePorting.Native from C# to C++ and port your C# projects to C++.

You can easily download the CodePorting.Native from C# to C++ Application for evaluation