title: Accessing a C++ function from a CXX test
body: <p>I'm writing a few CXX unit tests for a class I have written.  I have never written CXX tests before (also this is the only framework I can use).  I am trying to call a function contained within my class so that I can test the output is what is expected, but I am unsure if you can do this, and if so, how.</p>
  
  <pre><code>Test.h:
  class Test..... {
      public:
          std::string GenerateHash(const std::string&amp; user, const std::string&amp; url) const;
      ...
  }
  
  
  Test.cpp:
  string
  Test::GenerateHash(const string&amp; user, const string&amp; urrl) const {
      ...
   }
  </code></pre>
  
  <p>I have included the header file in the CXX test, but cannot access the GenerateHash function.</p>
  
  <pre><code>Test.cxx_h:
  void testCheckHashGeneration( void ) {
      TS_ASSERT_EQUALS (GenerateHash("testuser", "http://www.stackoverflow.com"), "DFEGEC.....");
  }
  
  Error: error: âGenerateHashâ was not declared in this scope
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>Test.cxx_h:
  void testCheckHashGeneration( void ) {
      Test test;
      TS_ASSERT_EQUALS (test-&gt;GenerateHash("testuser", "http://www.stackoverflow.com"), "DFEGEC.....");
  }
  
  Error: error: âTestâ has not been declared 
  </code></pre>
  
  <p>Any help will be greatly appreciated.</p>