Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3931616
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:22:08+00:00 2026-05-19T23:22:08+00:00

I am trying to implement unit test with boost test libraries. I started by

  • 0

I am trying to implement unit test with boost test libraries. I started by reading the manual at the boost site. After this i make a simple test program in one of my already existing project. The only problem which i face is that i am unable to see the test result. I am sure that i am making some thing wrong 🙂 but i am unable to figure that. Following are the details of my project

I am using visual studio8 for this:
I have a solution named MyProject.sln

Along with other projects i have a project named MyDLL.vcproj (The type of this project is DLL)

Along with other files in MYDLL proj i add a new cpp file name MyTest.cpp, the file contains the following code:

#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
//#define BOOST_TEST_MODULE MyTestTestModue  //no need for this maro if above macro is used
#include <boost/test/unit_test.hpp>

BOOST_AUTO_TEST_CASE(SampleTC)
{
    BOOST_CHECK(true);
};    

I make following changes in MYDLL project property sheet

C++ -> General -> Additional Include Dependencies = D:\MyProject\Boost\boost\test
Linker -> General -> Additional Libray Directories = D:\MyProject\Boost\lib\win32\Debug
Linker -> System -> SubSystem = (/SUBSYSTEM:CONSOLE)

I read all the compilation details given in the manual, but still unable to get the output. Ideally i want to use the Boost test as a standalone lib (Dynamic library varian of UTF).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T23:22:08+00:00Added an answer on May 19, 2026 at 11:22 pm

    I am sure that i am making some thing
    wrong 🙂

    Actually, I think the problem is you are making something right.

    Your test passes, because the value checked is true, and by default Boost.Test only outputs information about tests that have failed. You need to set the log level, which can be done one of two ways: passing --log_level=all as an option the the test executable, or setting the environment variable BOOST_TEST_LOG_LEVEL to all.

    See this page of the documentation for all the run time parameters.

    Edit: It’s actually –log_level (with an underscore in the middle)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement a unit test for a function in a project that
I've been trying to implement unit testing and currently have some code that does
Am trying to implement a generic way for reading sections from a config file.
I'm trying to implement something like this: <div> <table> <thead> <tr> <td>Port name</td> <td>Current
I'm trying to implement unit tests for function that uses imported external objects. For
I'm trying to implement unit testing for my code and I'm having a hard
I'm trying to implement unit testing for aproject, it uses a legacy utility project
I'm developing an asp.net (classic) application trying to implement the MVP pattern using this
I'm trying to unit test a custom action result. I recently watched Jimmy Bogard's
I am trying to implement EINVAL, EPERM, ESRCH in my program. ERRORS EINVAL An

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.