Need help understading boost regression test

This is a discussion on Need help understading boost regression test within the C++ Programming forums, part of the General Programming Boards category; I'm getting a warning when compiling with boost::filesystem under mingw-g++ 3.4.5 in debug mode. The warning is: passing negative value ...

  1. #1
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383

    Need help understading boost regression test

    I'm getting a warning when compiling with boost::filesystem under mingw-g++ 3.4.5 in debug mode.

    The warning is:

    passing negative value '-0x000000001' for converting 3 of 'boost::filesystem::basic_filesystem_error<Path>:: basic_filesystem_error(const std::string&, const Path&, boost::filesystem::system_error_type) [with Path = boost::filesystem:ath]'
    I took a look in the web and was sent to the following page:

    Regression test

    However, I can't read it. I'm not familiar with the concept of regression tests what they mean exactly and what can be done with - or learned from? - the information.

    What I need to know is to first understand the compile time warning.

    It points to a negative value where it seems it expects a positive one. However I can't seem to dig in enough the boost code to access the boost::filesystem::system_error_type declaration. So i'm left guessing there is an intended conversion taking place but mingw flags it regardless.

    I would also need help in understanding what exactly is a regression test from the boost perspective.

    What troubles me here is the fact this warning is flagged by the regression test as success. So my understanding of regression tests as described on the wiki may not be enough.
    Last edited by Mario F.; 06-05-2007 at 04:04 AM.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    The regression tests are a set of small programs that test various invariants in the libraries. Basically, each test tests a small part of the functionality of the libraries.

    For each test, it is defined what the expected result is. Some tests are expected to fail compilation. Some tests are expected to succeed in compilation but generate some error at runtime. Some tests are expected to run cleanly.
    Boost does not, at this time, ensure that no compiler warnings are created during compilation of the tests. There are various reasons for this, but the primary one is lack of resources and time.

    Nevertheless, passing a -1 compile time constant to unsigned types (system_error_type is an unsigned integral type) is commonly accepted practice to get the largest possible value of that type, so this warning is probably spurious.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    I completely forgot about this. Sorry, CornedBee. ++Extremely busy these past months. But still it's not my way to let an answer go without at least a thank you.

    Why you think numeric_limits wasn't used instead?
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    *shrug*
    Because it's shorter, probably.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    Yes... anyways, thanks.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Integer Emulation
    By Elysia in forum C++ Programming
    Replies: 31
    Last Post: 03-18-2008, 01:03 PM
  2. undefined reference
    By 3saul in forum Linux Programming
    Replies: 12
    Last Post: 08-23-2006, 05:28 PM
  3. C++ Operator Overloading help
    By Bartosz in forum C++ Programming
    Replies: 2
    Last Post: 08-17-2005, 12:55 PM
  4. MSVC Template Constructor/Assignment Errors
    By LuckY in forum Windows Programming
    Replies: 3
    Last Post: 07-22-2005, 02:57 PM
  5. Why is my program freezing?
    By ShadowMetis in forum Windows Programming
    Replies: 8
    Last Post: 08-20-2004, 03:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21