当前位置: 首页>>代码示例>>C++>>正文


C++ TestException类代码示例

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


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

示例1: TestException

 /**
 * @brief Copy Constructor
 */
 TestException(const TestException &te)
 {
   m_Message = (&te)->getMessage();
   m_FileName = te.getFileName();
   m_LineNumber = te.getLineNumber();
   updateWhat();
 }
开发者ID:chongbingbao,项目名称:DREAM3D,代码行数:10,代码来源:UnitTestSupport.hpp

示例2: readonlyStringAttributeAttributeGetter

static void readonlyStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
  v8::Local<v8::Object> holder = info.Holder();

  TestException* impl = V8TestException::toImpl(holder);

  v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolate());
}
开发者ID:mirror,项目名称:chromium,代码行数:7,代码来源:V8TestException.cpp

示例3: testDerivedClass

 /** Try to instantiate a derived class.
  */
 void testDerivedClass()
 {
     TestException t;
     shouldEqual(strncmp(t.what(), "qwerty", 6), 0);
     TestExceptionWithOverload to;
     shouldEqual(strncmp(to.what(), "qwerty", 6), 0);
 }
开发者ID:,项目名称:,代码行数:9,代码来源:

示例4: jsTestExceptionName

JSValue jsTestExceptionName(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSTestException* castedThis = jsCast<JSTestException*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    TestException* impl = static_cast<TestException*>(castedThis->impl());
    JSValue result = jsString(exec, impl->name());
    return result;
}
开发者ID:dzhshf,项目名称:WebKit,代码行数:8,代码来源:JSTestException.cpp

示例5: main

// returns 0 if all tests pass
int main()
{
   TestException a;
   try {
      a.funcie();
   } catch (gpstk::Exception& e) {
      cout << "main " << e;
   }
}
开发者ID:ianmartin,项目名称:GPSTk,代码行数:10,代码来源:exceptiontest.cpp

示例6: constructor

static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) {
  ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ConstructionContext, "TestException");

  if (UNLIKELY(info.Length() < 1)) {
    exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
    return;
  }

  unsigned argument;
  argument = toUInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState);
  if (exceptionState.hadException())
    return;

  TestException* impl = TestException::create(argument);
  v8::Local<v8::Object> wrapper = info.Holder();
  wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestException::wrapperTypeInfo, wrapper);
  v8SetReturnValue(info, wrapper);
}
开发者ID:mirror,项目名称:chromium,代码行数:18,代码来源:V8TestException.cpp

示例7: nameAttrGetter

static v8::Handle<v8::Value> nameAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    TestException* imp = V8TestException::toNative(info.Holder());
    return v8String(imp->name(), info.GetIsolate(), ReturnUnsafeHandle);
}
开发者ID:,项目名称:,代码行数:5,代码来源:

示例8: toStringMethod

static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    TestException* impl = V8TestException::toNative(info.Holder());
    v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:5,代码来源:V8TestException.cpp

示例9: readonlyStringAttributeAttributeGetter

static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
    v8::Handle<v8::Object> holder = info.Holder();
    TestException* impl = V8TestException::toNative(holder);
    v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolate());
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:6,代码来源:V8TestException.cpp

示例10: readonlyUnsignedShortAttributeAttributeGetter

static void readonlyUnsignedShortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    v8::Local<v8::Object> holder = info.Holder();
    TestException* impl = V8TestException::toImpl(holder);
    v8SetReturnValueUnsigned(info, impl->readonlyUnsignedShortAttribute());
}
开发者ID:joone,项目名称:blink-crosswalk,代码行数:6,代码来源:V8TestException.cpp

示例11: nameAttributeGetter

static void nameAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
    TestException* imp = V8TestException::toNative(info.Holder());
    v8SetReturnValueString(info, imp->name(), info.GetIsolate());
    return;
}
开发者ID:halton,项目名称:blink-crosswalk,代码行数:6,代码来源:V8TestException.cpp


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