MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / TEST

Function TEST

test/QAlg/ArithmeticUnit.test.cpp:352–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350
351
352TEST(ArithmeticUnit, test1)
353{
354 //do
355 //{
356 // init();
357 // //test_bind_data();
358 // //test_bind_nonnegative_data();
359 // //test_QAdder();
360 // //test_QAdderWithCarry();
361 // //test_QAdd();
362 // //test_QComplement();
363 // //test_QSub();
364 // //test_QMultiplier();
365 // //test_QMul();
366 // //test_QDivider();
367 // //test_QDividerWithAccuracy();
368 // //test_QDiv();
369 // test_QDivWithAccuracy();
370 // finalize();
371 //} while (getchar() != 'q');
372
373 bool test_val = false;
374 try
375 {
376 // special algorithm cases , you should run a test case individually
377 //at();
378 test_val = test_ADD();
379 //test_val = test_QAdd();
380 //test_val = test_QSub();
381 //test_val = test_QMultiplier();
382 //test_val = test_QMul();
383 //test_val = test_QDivider();
384 finalize();
385
386 }
387 catch (const std::exception& e)
388 {
389 cout << "Got a exception: " << e.what() << endl;
390 }
391 catch (...)
392 {
393 cout << "Got an unknow exception: " << endl;
394 }
395
396 ASSERT_TRUE(test_val);
397 cout << endl;
398}

Callers

nothing calls this directly

Calls 3

test_ADDFunction · 0.85
finalizeFunction · 0.85
whatMethod · 0.45

Tested by

no test coverage detected