How to test c++ template class with multiple template parameters using gtest?
I want to test a template class with gtest. I read about TYPED_TEST s in gtest manual and looked at the official example ( samples\sample6_unittest.cc ) they reference. This template from the example has only one template parameter. But, my code has two template parameters, how can I test it? I have the following code: // two element type template <typename E, typename F> class QueueNew { public: QueueNew() {} void Enqueue(const E& element) {} E* Dequeue() {} F size() const { return (F)123; } }; for which I wrote the test code below: template <class E, class F> QueueNew<E, F>* CreateQueue();