Skip to content

Commit

Permalink
Test static member functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jhanssen committed Jul 13, 2012
1 parent ac11907 commit ea9e8e8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/staticmember/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "test.h"
#include <stdio.h>

int main(int argc, char** argv)
{
int s = TestClass::someFunction("foobar");
printf("jadda %d\n", s);
return 0;
}
11 changes: 11 additions & 0 deletions tests/staticmember/test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "test.h"

int TestClass::someFunction(const std::string& ting)
{
return 5;
}

bool TestClass::someOtherFunction(int hepp)
{
return false;
}
13 changes: 13 additions & 0 deletions tests/staticmember/test.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef TEST_H
#define TEST_H

#include <string>

class TestClass
{
public:
static int someFunction(const std::string& ting);
static bool someOtherFunction(int hepp);
};

#endif

0 comments on commit ea9e8e8

Please sign in to comment.