Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Visual Studio 2015 Cookbook

You're reading from   Visual Studio 2015 Cookbook Over 50 new and improved recipes to put Visual Studio 2015 to work in your crucial development projects

Arrow left icon
Product type Paperback
Published in Aug 2016
Publisher Packt
ISBN-13 9781785887260
Length 368 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
Jeff Martin Jeff Martin
Author Profile Icon Jeff Martin
Jeff Martin
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Exploring Visual Studio 2015 2. Getting Started with Universal Windows Platform Apps FREE CHAPTER 3. Web Development 4. .NET Framework Development 5. Debugging Your .NET Application 6. Asynchrony in .NET 7. Unwrapping C++ Development 8. Working with Team Foundation Server 2015 9. Languages 10. Final Polish Index

Unit testing C++ applications


Previously, we saw the .NET-based Unit testing .NET applications recipe in Chapter 4, .NET Framework Development, but C++ developers have not been forgotten, and VS2015 includes built-in support for unit testing with CppUnit.

C++ developers can choose from several types of unit test projects, including the Native Unit Test Project, the Managed Unit Test Project, and the Unit Test App (Universal Windows) project. The first applies exclusively to desktop C++ development, the second applies exclusively to managed (C++/CX) code, and the third is for UWP-based apps.

In this recipe, we'll create a simple piece of code, and add some unit tests to it, which take advantage of the Native Unit Test Project.

Getting ready

Simply start VS2015 (Community or a Premium version), and you're ready to go. You can do this in any version of modern Windows, since you're going to be creating a Native Unit Test Project.

How to do it...

To unit test your code, perform the following steps...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image