[UTF] expected constructor, destructor, or type conversion before ‘(’ token

Hi,
Today, I tried to build Unit Test examples on my Linux box and without
success so far.
I use Ubuntu Breezy, so installed Boost from packages.
It seems to be Boost 1.33 version:
http://packages.ubuntu.com/breezy/libs/libboost-test1.33.0
GCC on my box is:
mloskot@dog:~$ g++ --version
g++ (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
Next, I checkouted Boost sources from CVS to have latest examples on my disk.
As a first test I tried to build
boost/libs/test/example/unit_test_example_04.cpp
that mainly presents usage of BOOST_AUTO_TEST_SUITE and
BOOST_AUTO_TEST_CASE macros.
Here is error message I got:
mloskot@dog:~/dev/boost/_cvs/boost/libs/test/example$ g++ -Wall
unit_test_example_04.cpp -lboost_unit_test_framework
unit_test_example_04.cpp:15: error: expected constructor, destructor, or type
conversion before ‘(’ token
unit_test_example_04.cpp:17: error: expected constructor, destructor, or type
conversion before ‘(’ token
unit_test_example_04.cpp:25: error: expected constructor, destructor, or type
conversion before ‘(’ token
unit_test_example_04.cpp:34: error: expected constructor, destructor, or type
conversion before ‘;’ token
unit_test_example_04.cpp:39: error: expected constructor, destructor, or type
conversion before ‘(’ token
unit_test_example_04.cpp:48: error: expected constructor, destructor, or type
conversion before ‘(’ token
unit_test_example_04.cpp:51: error: expected constructor, destructor, or type
conversion before ‘(’ token
unit_test_example_04.cpp:58: error: expected constructor, destructor, or type
conversion before ‘;’ token
mloskot@dog:~/dev/boost/_cvs/boost/libs/test/example$
Nothing more.
I also tried to compile example as simple as possible example:
#include

"Mateusz Loskot"
Hi,
Today, I tried to build Unit Test examples on my Linux box and without success so far.
I use Ubuntu Breezy, so installed Boost from packages. It seems to be Boost 1.33 version: http://packages.ubuntu.com/breezy/libs/libboost-test1.33.0
GCC on my box is: mloskot@dog:~$ g++ --version g++ (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
Next, I checkouted Boost sources from CVS to have latest examples on my disk. As a first test I tried to build boost/libs/test/example/unit_test_example_04.cpp that mainly presents usage of BOOST_AUTO_TEST_SUITE and BOOST_AUTO_TEST_CASE macros.
I don't think you could do this. Examples in cvs will only work with library build from cvs sources. Try examples that came with boost 1.33. Gennadiy

Gennadiy Rozental wrote:
"Mateusz Loskot"
wrote in message: Next, I checkouted Boost sources from CVS to have latest examples on my disk. As a first test I tried to build boost/libs/test/example/unit_test_example_04.cpp that mainly presents usage of BOOST_AUTO_TEST_SUITE and BOOST_AUTO_TEST_CASE macros.
I don't think you could do this. Examples in cvs will only work with library build from cvs sources. Try examples that came with boost 1.33.
Hi Gennadiy,
Yes, certainly you're right.
I tested with examples from Boost 1.33 and it works well.
I noticed that the only difference between examples from 1.34 and 1.33
is header file included:
// for Boost 1.34
#define BOOST_TEST_MAIN
#include

I also checked that the version above for Boost 1.33 works well with Boost 1.34 (tested with VC++ 8.0). So, can I safely use older approach:
#define BOOST_AUTO_TEST_MAIN #include
and assume that it will work well with future releases of Boost?
No - old names are depricated. You still could use it. But it's going to be removed in some future release. Boost 1.34 should be out pretty soon. You may want to wait till it's out and rely purely on new names. Gennadiy

Gennadiy Rozental wrote:
I also checked that the version above for Boost 1.33 works well with Boost 1.34 (tested with VC++ 8.0). So, can I safely use older approach:
#define BOOST_AUTO_TEST_MAIN #include
and assume that it will work well with future releases of Boost?
No - old names are depricated. You still could use it. But it's going to be removed in some future release. Boost 1.34 should be out pretty soon. You may want to wait till it's out and rely purely on new names.
Thanks for your explanation. Unfortunately, using new names is a problem because users of library I'm working on will mostly use stable Boost release installed from packages available for Linux distributions they use e.g. Debian. And those distributions mostly provide 1.33 version. Second, those ditributions will not be updated very soon but I'd not like to force my users to install latest Boost themself. I have to think about it :-) Best regards -- Mateusz Łoskot http://mateusz.loskot.net

No - old names are depricated. You still could use it. But it's going to be removed in some future release. Boost 1.34 should be out pretty soon. You may want to wait till it's out and rely purely on new names.
Thanks for your explanation. Unfortunately, using new names is a problem because users of library I'm working on will mostly use stable Boost release installed from packages available for Linux distributions they use e.g. Debian. And those distributions mostly provide 1.33 version. Second, those ditributions will not be updated very soon but I'd not like to force my users to install latest Boost themself.
Well, stick to 1.33 API. And it will work for a long while. Gennadiy

Gennadiy Rozental wrote:
No - old names are depricated. You still could use it. But it's going to be removed in some future release. Boost 1.34 should be out pretty soon. You may want to wait till it's out and rely purely on new names.
Thanks for your explanation. Unfortunately, using new names is a problem because users of library I'm working on will mostly use stable Boost release installed from packages available for Linux distributions they use e.g. Debian. And those distributions mostly provide 1.33 version. Second, those ditributions will not be updated very soon but I'd not like to force my users to install latest Boost themself.
Well, stick to 1.33 API. And it will work for a long while.
OK. Thanks Cheers -- Mateusz Łoskot http://mateusz.loskot.net

Gennadiy Rozental wrote:
I also checked that the version above for Boost 1.33 works well with Boost 1.34 (tested with VC++ 8.0). So, can I safely use older approach:
#define BOOST_AUTO_TEST_MAIN #include
and assume that it will work well with future releases of Boost?
No - old names are depricated. You still could use it. But it's going to be removed in some future release. Boost 1.34 should be out pretty soon. You may want to wait till it's out and rely purely on new names.
Hi Gennadiy, I have some more questions if you don't mind. Unfortunately, I'm a bit disappointed about how easy it's possible to break backward compatibility between close releases of Boost. I'd really don't expect to experience such important change between so close releasese like 1.33 and 1.34. Now, I'm asking myself "Does it mean that I have to keep in mind such problems can occur quite often?" So, now I doubt if I can see my code based on Boost as a stable. Another potential problem I see is that often changes in Boost API will easily force some overhead of maintenance of my code base. Please, could you comment my thoughts? If my assumptions are quite correct, then I think I have to consider using more stable Unit Testing tools. Best regards -- Mateusz Łoskot http://mateusz.loskot.net

Hi Gennadiy,
I have some more questions if you don't mind. Unfortunately, I'm a bit disappointed about how easy it's possible to break backward compatibility between close releases of Boost.
Boost.Test *is* backward compartible. It's not forward compartible though. Meaning you couldn't use new examples with old library. Some features are indeed getting deprecated. But usually it takes 2-3 releases at least (in time frame it's close to 1-2 years). Unless you have any particular issues using old example with new library, do you? Gennadiy

Gennadiy Rozental wrote:
I have some more questions if you don't mind. Unfortunately, I'm a bit disappointed about how easy it's possible to break backward compatibility between close releases of Boost.
Boost.Test *is* backward compartible. It's not forward compartible though. Meaning you couldn't use new examples with old library. Some features are indeed getting deprecated. But usually it takes 2-3 releases at least (in time frame it's close to 1-2 years).
Unless you have any particular issues using old example with new library, do you?
Hi Gennadiy, It seems I don't understand something or I've not expressed the problem clearly. Let me try again. I started with Boost.Test from Boost 1.34. After some time, I realized that many of my users will be able to use only Boost 1.33. Then, I noticed that my Unit Tests based on Boost's UTF are not working with Boost 1.33. So, that's what I understand as a "broken backward compatibility". Boost UTF interface seems to be changed in 1.34, so it's not possible to use Unit Tests written using Boost 1.34 with Boost 1.33. If Boost 1.34 was backward compatible, then those tests prepared with 1.34 could be run using 1.33. Am I right? OK, I agree backward/forward understanding may be different, so please don't stick to those words, but to my explanation. Now, how should I move on with Boost.Test to ensure that: - users using Boost 1.33 will be able to run my tests - users using Boost 1.34 and higher will be able to run my tests ? Thanks for your patience ;-) Cheers -- Mateusz Łoskot http://mateusz.loskot.net

"Mateusz Loskot"
Gennadiy Rozental wrote:
I have some more questions if you don't mind. Unfortunately, I'm a bit disappointed about how easy it's possible to break backward compatibility between close releases of Boost.
Boost.Test *is* backward compartible. It's not forward compartible though. Meaning you couldn't use new examples with old library. Some features are indeed getting deprecated. But usually it takes 2-3 releases at least (in time frame it's close to 1-2 years).
Unless you have any particular issues using old example with new library, do you?
Hi Gennadiy,
It seems I don't understand something or I've not expressed the problem clearly. Let me try again.
I started with Boost.Test from Boost 1.34. After some time, I realized that many of my users will be able to use only Boost 1.33. Then, I noticed that my Unit Tests based on Boost's UTF are not working with Boost 1.33. So, that's what I understand as a "broken backward compatibility". Boost UTF interface seems to be changed in 1.34, so it's not possible to use Unit Tests written using Boost 1.34 with Boost 1.33. If Boost 1.34 was backward compatible, then those tests prepared with 1.34 could be run using 1.33. Am I right?
No. This is forward compartibility. You want older version handle code written for newer version
OK, I agree backward/forward understanding may be different, so please don't stick to those words, but to my explanation.
Now, how should I move on with Boost.Test to ensure that: - users using Boost 1.33 will be able to run my tests - users using Boost 1.34 and higher will be able to run my tests
Don't use features/interfaces introduced in 1.34. Stick to 1.33 one. Gennadiy

Gennadiy Rozental wrote:
"Mateusz Loskot"
wrote in message news:4415BCE3.8000304@loskot.net... Gennadiy Rozental wrote:
I have some more questions if you don't mind. Unfortunately, I'm a bit disappointed about how easy it's possible to break backward compatibility between close releases of Boost.
Boost.Test *is* backward compartible. It's not forward compartible though. Meaning you couldn't use new examples with old library. Some features are indeed getting deprecated. But usually it takes 2-3 releases at least (in time frame it's close to 1-2 years).
Unless you have any particular issues using old example with new library, do you?
Hi Gennadiy,
It seems I don't understand something or I've not expressed the problem clearly. Let me try again.
I started with Boost.Test from Boost 1.34. After some time, I realized that many of my users will be able to use only Boost 1.33. Then, I noticed that my Unit Tests based on Boost's UTF are not working with Boost 1.33. So, that's what I understand as a "broken backward compatibility". Boost UTF interface seems to be changed in 1.34, so it's not possible to use Unit Tests written using Boost 1.34 with Boost 1.33. If Boost 1.34 was backward compatible, then those tests prepared with 1.34 could be run using 1.33. Am I right?
No. This is forward compartibility. You want older version handle code written for newer version
Yes, now it's clears, sorry for my misunderstanding.
OK, I agree backward/forward understanding may be different, so please don't stick to those words, but to my explanation.
Now, how should I move on with Boost.Test to ensure that: - users using Boost 1.33 will be able to run my tests - users using Boost 1.34 and higher will be able to run my tests
Don't use features/interfaces introduced in 1.34. Stick to 1.33 one.
OK, that's what I suppose to do, but furst I wanted to follow your recommendation: "You still could use it. But it's going to be removed in some future release." Thanks for your explanation Cheers -- Mateusz Łoskot http://mateusz.loskot.net
participants (2)
-
Gennadiy Rozental
-
Mateusz Łoskot