Example #1
0
    void onObjectsFinished(cxxtools::RemoteResult<std::vector<Color> >& result)
    {
      std::vector<Color> ret = result.get();
      if (ret.size() != _objectsCount)
      {
        {
          cxxtools::MutexLock lock(mutex);
          std::cerr << "wrong response result size " << ret.size() << std::endl;
        }

        failed(this);
      }

      finished(this);
    }
Example #2
0
    void onEchoFinished(cxxtools::RemoteResult<std::string>& result)
    {
      std::string ret = result.get();
      if (ret != _msg)
      {
        {
          cxxtools::MutexLock lock(mutex);
          std::cerr << "wrong response result \"" << ret << '"' << std::endl;
        }

        failed(this);
      }

      finished(this);
    }
Example #3
0
    void onSeqFinished(cxxtools::RemoteResult<std::vector<int> >& result)
    {
      std::vector<int> ret = result.get();
      if (ret.size() != _endValue - _startValue + 1)
      {
        {
          cxxtools::MutexLock lock(mutex);
          std::cerr << "wrong response result size " << ret.size() << std::endl;
        }

        failed(this);
      }

      finished(this);
    }
Example #4
0
 void onConnectErrorCallback(cxxtools::RemoteResult<bool>& r)
 {
     log_debug("onConnectErrorCallback");
     _loop.exit();
     CXXTOOLS_UNIT_ASSERT_THROW(r.get(), std::exception);
 }