shaobozi / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

unable to test abstract classes through gtest #375

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
IMPORTANT NOTE: PLEASE send issues or requests to
http://groups.google.com/group/googletestframework *instead of here*.
This issue tracker is NOT regularly monitored.

If you really need to create a new issue, please provide the information
asked for below.

What steps will reproduce the problem?
1.Define an abstract class with one of its method as pure virtual
2.Derive a class from that abstract class
3.Try to test one of the functions of abstract class

What is the expected output? What do you see instead?

ample of linking errors like unresolved external
What version of Google Test are you using? On what operating system?

1.6
Please provide any additional information below, such as a code snippet.

Original issue reported on code.google.com by npande...@gmail.com on 5 Jul 2011 at 1:22

Attachments:

GoogleCodeExporter commented 9 years ago
In C++, unless you override _all_ the pure virtual members defined in the 
abstract base class, you cannot instantiate a derived class. Note, you have to 
also provide definitions of the overriding methods.

Original comment by vladlosev on 18 Aug 2011 at 7:31