• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ TestNode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中TestNode的典型用法代码示例。如果您正苦于以下问题:C++ TestNode类的具体用法?C++ TestNode怎么用?C++ TestNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TestNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: hrefAttributeSetter

static void hrefAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
    v8::Handle<v8::Object> holder = info.Holder();
    TestNode* impl = V8TestNode::toImpl(holder);
    TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
    impl->setHref(cppValue);
}
开发者ID:335969568,项目名称:Blink-1,代码行数:7,代码来源:V8TestNode.cpp


示例2: main

int main(int _argc, char** _argv)
{
  printf("TestPlugin client for EuRoC challenge 2 simulator\n\n");
  if (_argc <= 1)
  {
    printf("Usage: TestNode --init # before task\n       TestNode --check # after task\n");
    exit(EXIT_FAILURE);
  }
  ros::init(_argc, _argv, "TestNode");
  if (!ros::master::check())
  {
    printf("Failed to contact rosmaster!\n");
    exit(EXIT_FAILURE);
  }
  TestNode node;
  if (strcmp(_argv[1], "--init") == 0)
  {
    node.startListening();
  }
  else if (strcmp(_argv[1], "--check") == 0)
  {
    node.check();
  }
  exit(EXIT_SUCCESS);
}
开发者ID:SUTURO,项目名称:euroc_launch,代码行数:25,代码来源:TestNode.cpp


示例3: constructor

static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    TestNode* impl = TestNode::create();
    v8::Local<v8::Object> wrapper = info.Holder();
    wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestNode::wrapperTypeInfo, wrapper);
    v8SetReturnValue(info, wrapper);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:7,代码来源:V8TestNode.cpp


示例4: main

int main() {
    TestNode testNode;
    testNode.testUnlabelledNode();
    testNode.testLabelledNode();
    testNode.testNodeCopy();

 //   EdgeTest().testEdge();
}
开发者ID:kushalarora,项目名称:GraphLib,代码行数:8,代码来源:test_node.cpp


示例5: hrefByteStringAttributeSetter

static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
    v8::Handle<v8::Object> holder = info.Holder();
    ExceptionState exceptionState(ExceptionState::SetterContext, "hrefByteString", "TestNode", holder, info.GetIsolate());
    TestNode* impl = V8TestNode::toImpl(holder);
    TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Value, exceptionState), exceptionState);
    impl->setHrefByteString(cppValue);
}
开发者ID:335969568,项目名称:Blink-1,代码行数:8,代码来源:V8TestNode.cpp


示例6: hrefCallWithAttributeSetter

static void hrefCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
    v8::Handle<v8::Object> holder = info.Holder();
    TestNode* impl = V8TestNode::toImpl(holder);
    TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
    ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
    impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
}
开发者ID:335969568,项目名称:Blink-1,代码行数:8,代码来源:V8TestNode.cpp


示例7: hrefAttributeSetter

static void hrefAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
    v8::Local<v8::Object> holder = info.Holder();
    TestNode* impl = V8TestNode::toImpl(holder);
    V8StringResource<> cppValue = v8Value;
    if (!cppValue.prepare())
        return;
    impl->setHref(cppValue);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:9,代码来源:V8TestNode.cpp


示例8: hrefThrowsAttributeSetter

static void hrefThrowsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
    v8::Handle<v8::Object> holder = info.Holder();
    ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", "TestNode", holder, info.GetIsolate());
    TestNode* impl = V8TestNode::toImpl(holder);
    TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
    impl->setHrefThrows(cppValue, exceptionState);
    exceptionState.throwIfNeeded();
}
开发者ID:335969568,项目名称:Blink-1,代码行数:9,代码来源:V8TestNode.cpp


示例9: hrefCallWithAttributeSetter

static void hrefCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
    v8::Local<v8::Object> holder = info.Holder();
    TestNode* impl = V8TestNode::toImpl(holder);
    V8StringResource<> cppValue = v8Value;
    if (!cppValue.prepare())
        return;
    ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
    impl->setHrefCallWith(executionContext, currentDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:10,代码来源:V8TestNode.cpp


示例10: hrefByteStringAttributeSetter

static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
    v8::Local<v8::Object> holder = info.Holder();
    ExceptionState exceptionState(ExceptionState::SetterContext, "hrefByteString", "TestNode", holder, info.GetIsolate());
    TestNode* impl = V8TestNode::toImpl(holder);
    V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, exceptionState);
    if (exceptionState.throwIfNeeded())
        return;
    impl->setHrefByteString(cppValue);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:10,代码来源:V8TestNode.cpp


示例11: TEST

 TEST(NodeTest, destroyChild) {
     using namespace ::testing;
     
     TestNode* root = new TestNode();
     bool childDestroyed = false;
     DestroyableNode* child = new DestroyableNode(childDestroyed);
     
     root->addChild(child);
     delete root;
     
     ASSERT_TRUE(childDestroyed);
 }
开发者ID:Gustavo6046,项目名称:TrenchBroom,代码行数:12,代码来源:NodeTest.cpp


示例12: NODE_LOAD

// Load
//------------------------------------------------------------------------------
/*static*/ Node * TestNode::Load( IOStream & stream )
{
	NODE_LOAD( AStackString<>, name );

	NodeGraph & ng = FBuild::Get().GetDependencyGraph();
	TestNode * node = ng.CreateTestNode( name );

	if ( node->Deserialize( stream ) == false )
	{
		return nullptr;
	}
	return node;
}
开发者ID:JeremieA,项目名称:fastbuild,代码行数:15,代码来源:TestNode.cpp


示例13: prepareAndSubmitBlock

bool BaseFunctionalTests::prepareAndSubmitBlock(TestNode& node, CryptoNote::Block&& blockTemplate) {
  blockTemplate.timestamp = m_nextTimestamp;
  m_nextTimestamp += 2 * m_currency.difficultyTarget();

  BinaryArray blockBlob = CryptoNote::toBinaryArray(blockTemplate);
  return node.submitBlock(::Common::toHex(blockBlob.data(), blockBlob.size()));
}
开发者ID:iamsmooth,项目名称:bitcedi,代码行数:7,代码来源:BaseFunctionalTests.cpp


示例14: group

bool group(int vertex, ...)
{
    TestNode* v = resultsList;

    va_list ap;
    va_start(ap, vertex);
    while (vertex != -1) {
        CHECK(v != nullptr);
        CHECK(v->index == unsigned(vertex));
        v = v->nextNodeInGroup();
        vertex = va_arg(ap, int);
    }
    va_end(ap);

    CHECK(v == nullptr);
    resultsList = resultsList->nextGroup();
    return true;
}
开发者ID:MichaelKohler,项目名称:gecko-dev,代码行数:18,代码来源:testFindSCCs.cpp


示例15: main

int main(int argc, char** argv)
{
  ros::init(argc, argv, "plane_extraction");

  if (argc != 2 && argc != 4)
  {
    ROS_ERROR("Usage: %s <filename.pcd> [min_z max_z]", argv[0]);
    return 1;
  }

  TestNode tn;

  if (argc == 4)
    tn.setupPassThroughFilter(argv[2], argv[3]);

  tn.loadCloud(argv[1]);
  tn.run();

  return 0;
}
开发者ID:Imperoli,项目名称:rockin_at_work_software,代码行数:20,代码来源:offline_plane_extraction_test.cpp


示例16: main

int main( int argc, char** argv )
{
  ros::init(argc, argv, "ros_buildfarm_test");

  TestNode tn;

  ros::Rate r(1);

  const size_t n = 100000;
  size_t idx = 0;
  while(ros::ok())
  {
    if (idx > n)
      break;
    idx++;
    tn.publish();
    std::cout << "publishing hello buildfarm" << std::endl;
    ros::spinOnce();
    r.sleep();
  }

  return 0;
}
开发者ID:Karsten1987,项目名称:ros_buildfarm_test,代码行数:23,代码来源:main.cpp


示例17: time_tree

void time_tree()
{
    const int N = 1000000;

    printf("Tree benchmark: ");  fflush(stdout);

    clock_t tm0 = clock();

    srand(12345);
    OwningTree<TestNode> tree1;
    for(int i = 0; i < N; i++)
    {
        tree1.get(rand());  tree1.get(rand());
        delete tree1.find_place(rand()).after();
    }

    clock_t tm1 = clock();

    srand(12345);
    map<int, Data> tree2;
    for(int i = 0; i < N; i++)
    {
        tree2[rand()] = Data();  tree2[rand()] = Data();
        map<int, Data>::iterator ptr = tree2.lower_bound(rand());
        if(ptr != tree2.end())tree2.erase(ptr);
    }

    clock_t tm2 = clock();

    tree1.check_();  map<int, Data>::iterator ptr = tree2.begin();
    for(TestNode *node = tree1.first(); node; node = node->next(), ++ptr)
        if(ptr == tree2.end() || ptr->first != node->id())debug_break();
    if(ptr != tree2.end())debug_break();

    printf("OwningTree<TestNode> ~ %.3fs; map<int, Data> ~ %.3fs;\n", (tm1 - tm0) * c2s, (tm2 - tm1) * c2s);
}
开发者ID:MrSmile,项目名称:NTL,代码行数:36,代码来源:benchmark.cpp


示例18: toHtml

QString HtmlGenerator::toHtml(const TestNode &test)
{
    if(!actionTemplate)
        return QString();

    actionTemplate->setField("CASE", test.getTestCase());
    actionTemplate->setField("NAME", test.getTestName());
    actionTemplate->setField("DESCRIPTION", test.getShortDescription());
    actionTemplate->setField("PREPARATION", toHtml(test.getPreparation()));
    actionTemplate->setField("ACTION", toHtml(test.getAction()));
    actionTemplate->setField("RESULT", toHtml(test.getExpectedResult()));

    return actionTemplate->getHtml();
}
开发者ID:atilm,项目名称:RequirementsManager,代码行数:14,代码来源:htmlgenerator.cpp


示例19: mineBlocks

bool BaseFunctionalTests::mineBlocks(TestNode& node, const CryptoNote::AccountPublicAddress& address, size_t blockCount) {
  for (size_t i = 0; i < blockCount; ++i) {
    Block blockTemplate;
    uint64_t difficulty;

    if (!node.getBlockTemplate(m_currency.accountAddressAsString(address), blockTemplate, difficulty)) {
      return false;
    }

    if (difficulty != 1) {
      return false;
    }

    if (!prepareAndSubmitBlock(node, std::move(blockTemplate))) {
      return false;
    }
  }

  return true;
}
开发者ID:iamsmooth,项目名称:bitcedi,代码行数:20,代码来源:BaseFunctionalTests.cpp


示例20: prepareAndSubmitBlock

bool BaseFunctionalTests::prepareAndSubmitBlock(TestNode& node, CryptoNote::Block&& blockTemplate) {
  blockTemplate.timestamp = m_nextTimestamp;
  m_nextTimestamp += 2 * m_currency.difficultyTarget();

  if (blockTemplate.majorVersion >= BLOCK_MAJOR_VERSION_2) {
    blockTemplate.parentBlock.majorVersion = BLOCK_MAJOR_VERSION_1;
    blockTemplate.parentBlock.minorVersion = BLOCK_MINOR_VERSION_0;
    blockTemplate.parentBlock.transactionCount = 1;

    CryptoNote::TransactionExtraMergeMiningTag mmTag;
    mmTag.depth = 0;
    if (!CryptoNote::get_aux_block_header_hash(blockTemplate, mmTag.merkleRoot)) {
      return false;
    }

    blockTemplate.parentBlock.baseTransaction.extra.clear();
    if (!CryptoNote::appendMergeMiningTagToExtra(blockTemplate.parentBlock.baseTransaction.extra, mmTag)) {
      return false;
    }
  }

  BinaryArray blockBlob = CryptoNote::toBinaryArray(blockTemplate);
  return node.submitBlock(::Common::toHex(blockBlob.data(), blockBlob.size()));
}
开发者ID:bitumencoin,项目名称:valentinecoinwallet,代码行数:24,代码来源:BaseFunctionalTests.cpp



注:本文中的TestNode类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TestObject类代码示例发布时间:2022-05-31
下一篇:
C++ TestMap类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap