Remove Observers from testSignal.cc
This commit is contained in:
parent
4f89009c9e
commit
ad0951ca53
1 changed files with 0 additions and 23 deletions
|
@ -3,9 +3,6 @@ using namespace std;
|
|||
|
||||
#include "../FbTk/Signal.hh"
|
||||
#include "../FbTk/MemFun.hh"
|
||||
#include "../FbTk/RelaySignal.hh"
|
||||
#include "../FbTk/Observer.hh"
|
||||
#include "../FbTk/Subject.hh"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -154,26 +151,6 @@ int main() {
|
|||
2.9);
|
||||
|
||||
}
|
||||
// Test relay new signals to old
|
||||
{
|
||||
cout << "---------- Testing relay of signals" << endl;
|
||||
struct Observer: public FbTk::Observer {
|
||||
void update(FbTk::Subject* subj) {
|
||||
cout << "Observer called." << endl;
|
||||
}
|
||||
};
|
||||
// setup old subject->observer listening
|
||||
FbTk::Subject destination;
|
||||
Observer obs;
|
||||
destination.attach(&obs);
|
||||
// create a new signal and relay it to the
|
||||
// old subject
|
||||
FbTk::Signal<string> source;
|
||||
FbTk::relaySignal(source, destination);
|
||||
// the new signal should now make the old
|
||||
// subject notify its observers
|
||||
source.emit("hello world");
|
||||
}
|
||||
|
||||
// Test argument selector
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue