Unit Test C++ code in Xcode - c++

I am using OCTest for Objective-C code. Does OCTest support C++? How do I go about writing tests for C++ classes?

Related

what is the difference between native c++ compiler and .net c++ compiler?

what is the difference between native c++ compiler and .net c++ compiler? Just for curiosity one of my friend asked me this question.
In general .net C++ compiler is a compiler that can compile C++/CLI code and generates intermediate object code.
While native c++ compiler is a compiler that knows nothing about C++/CLI and designed to compile C++ code.

Could C++.Net assemblies be decompiled easily?

I know that all assemblies can be decompiled somehow, but C# & VB applications are the easiest to be decompiled into source code using tools like ( .Net Reflector ).
So my question is, if I programmed an application using .Net assemblies and functions with C++, would it be easy to decompile it as if it was a C# or VB application with .Net reflector and such tools?
Ok, if I programmed it without using any function from .Net framework and made UI only what calls .Net assemblies, would be easy to decmpile also ?
My question is similar to this one : Could this C++ project be decompiled with such tools like a .NET Reflector?
but no one has answered him correctly, so can anyone help me ?
I want to use .Net and C++ to make my application compiled into both Native & Managed code!
There is no "C++.Net". There is C++/CLI, which is a C++-like language that can be used to glue native C++ code with the .NET world. The managed code you write in it (ref classes) will be compiled to MSIL. The "native" code will compile to either MSIL or native. If you want to compile some parts to native code you need
#pragma managed(push, off)
void foo() {}
#pragma managed(pop)
in your source. The managed pragma can be used to choose the compilation target per-function. Or you can compile without the /clr flag per-module and set your project to produce a mixed-mode assembly.
Be aware that marshaling the native types to .NET and back can take a serious performance hit on your application - and that happens every time you cross the native-managed boundary. But interoperation between such embedded native code and managed code is much faster than normal p/invoke.
See also this question: C++CLI. Are native parts written in pure C++ but compiled in CLI as fast as pure native C++?

Generating getters/setters in C++ with XCode?

I'm writing some C++ code for an iOS app, so I believe I have to use XCode to run/test the app. Is there a way to generate getters/setters and local or instance variables out of statements? Are there any alternatives?

Testing with Visual Studio Test 2010

Does any one know if I can test native code in VS Test 2010?
you can find here an interesting way to do it.
Apparently not according to the docs here.
You cannot have test projects with
unit tests that use unmanaged C++.
This is confirmed by MSFT here.
There was another question here on the stack that I can't find, but it linked me off to
How Do I: Create and Run Unit Tests in Visual C++?
This shows that you can unit test native code including C++ but to do so you would still write the unit tests in managed code.
I have not tried this in person, and one thing I noticed was the demo used the COM interface to test the C++ native code, so have no specific experience of using C++ classes more directly in the unit test.

CppUnit (or C++ unit tests in general) in Xcode

I've written some ObjC unit tests for use with the OCUnit support in Xcode. Now I would like to do the same for some of the C++ code I'm about to write (a separate static library).
Is there any support for e.g. CppUnit (or some other C++ test framework) in Xcode? When I write support, I mean I want to run the tests and display the results in the Xcode GUI.
Have you looked at Google C++ Testing Framework? That one should be pretty portable.