Skip to content

Instantly share code, notes, and snippets.

@leadVisionary
Created December 18, 2011 05:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leadVisionary/1492450 to your computer and use it in GitHub Desktop.
Save leadVisionary/1492450 to your computer and use it in GitHub Desktop.
MicroprocessorSimulator Mock Object
// C++
class MicroprocessorSimulator
{
public:
int (MicroprocessorSimulator::*pt2Member)(float, char, char) = NULL; // C++
void interruptHandler(char toTransform) { return toTransform+10; }
void handleInterrupt39(void (*interruptHandler)(char))
{
char transformed = (*interruptHandler)(a)
cout << "I'm a blinking bastard!" << endl; };
}
/* more of MicroprocessorSimulator */
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment