DocTest QML Type | Test

# DocTest QML Type

Represents a doc test case. More...

Import Statement: | import QDoc.Test 1.1
Since: | QDoc.Test 0.9

- List of all members, including inherited members

## Properties

- active : bool
- name : string

## Signals

- completed()
- foo(var bar)

## Methods

- fail(message)
- fail_hard(msg, option)

## Detailed Description

## Introduction

A documentation test case, itself documented inline in DocTest.qml.

## Property Documentation

active : bool

Whether the test is active.

See also name.

[required] name : string

Name of the test.

    DocTest {
        name: "test"
        // ...
    }

## Signal Documentation

completed()

Note: The corresponding handler is `onCompleted`.

foo(var bar)

Signal with parameter bar.

Note: The corresponding handler is `onFoo`.

## Method Documentation

`[since QDoc.Test 1.0]` fail(message = "oops")

Fails the current test case, with the optional message.

This method was introduced in QDoc.Test 1.0.

fail_hard(msg = "facepalm", option = 123)

Fails the current test case, hard.

- Prints out msg.
- Accepts a random option.