# ddocunittest

- `foo`

  #### Declaration

  `int `foo`(int `a`, int `b`);`

  `foo` function - 1 example

  #### Examples

  1. `assert(foo(1, 1) == 2);`
- `bar`

  #### Declaration

  `bool `bar`();`

  `bar` function - 1 example

  #### Examples

  1. `// documented assert(bar());`

  #### Examples

  placeholder

- `doo`

  #### Declaration

  `void `doo`();`

  `doo` function - no examples

- `add`

  #### Declaration

  `int `add`(int `a`, int `b`);`

  `add` function - 3 examples

  #### Examples

  1. `assert(add(1, 1) == 2);`

  #### Examples

  1. `// documented assert(add(3, 3) == 6); assert(add(4, 4) == 8);`

  #### Examples

  1. `// documented assert(add(5, 5) == 10); assert(add(6, 6) == 12);`
- `Foo`

  #### Declaration

  `class `Foo`;`

  class `Foo`

  #### Examples

  1. `Foo foo = new Foo;`
- `SomeClass`

  #### Declaration

  `class `SomeClass`;`

  some class - 1 example

  #### Examples

  1. `SomeClass sc = new SomeClass;`
- `Outer`

  #### Declaration

  `class `Outer`;`

  `Outer` - 1 example

  #### Examples

  1. `Outer outer = new Outer;`
  - `Inner`

    #### Declaration

    `class `Inner`;`

    `Inner`

    #### Examples

    1. `Inner inner = new Inner;`
- `foobar`

  #### Declaration

  `void `foobar`();`

  `foobar` - no examples

- `foo`

  #### Declaration

  `void `foo`(int `x`);`

  func - 4 examples

  #### Examples

  1. `foo(1);`

  #### Examples

  1. `foo(2);`

  #### Examples

  1. `foo(2);`

  #### Examples

  1. `foo(4);`
- `fooImport`

  #### Declaration

  `void `fooImport`();`

  #### Examples

  test

  1. `fooImport();`
- `fooStaticImport`

  #### Declaration

  `void `fooStaticImport`();`

  #### Examples

  test

  1. `fooStaticImport();`
- `fooSelectiveImport`

  #### Declaration

  `void `fooSelectiveImport`();`

  #### Examples

  test

  1. `fooSelectiveImport();`
- `fooRenamedImport`

  #### Declaration

  `void `fooRenamedImport`();`

  #### Examples

  test

  1. `fooRenamedImport();`
- `core.stdc.string`

  #### Declaration

  `public import `core.stdc.string`;`

  This is a public import

- `core.stdc.stdarg`

  #### Declaration

  `public import `core.stdc.stdarg`;`

  This is a mutiple public import

- `core.stdc.stdlib`

  #### Declaration

  `public import `core.stdc.stdlib`;`

  This is a mutiple public import

- `memcpy`

  #### Declaration

  `public import core.stdc.string : `memcpy`;`

  This is a public selective import

- `copy`

  #### Declaration

  `public import core.stdc.string : `copy` = memcpy;`

  This is a public selective renamed import

- `memcpy`
  `memcmp`

  #### Declaration

  `public import core.stdc.string : `memcpy`, `memcmp`;`

  This is a public multiple selective import

- `copy`
  `compare`

  #### Declaration

  `public import core.stdc.string : `copy` = memcpy, `compare` = memcmp;`

  This is a public multiple selective renamed import

- `str`

  #### Declaration

  `public import `str` = core.stdc.string;`

  This is a public renamed import

- `fooConditionalDecl1a`

  #### Declaration

  `void `fooConditionalDecl1a`();`

  #### Examples

  1. `int x1a;`
- `fooConditionalDecl1b`

  #### Declaration

  `void `fooConditionalDecl1b`();`

  #### Examples

  1. `int x1b;`
- `fooConditionalDecl3a`

  #### Declaration

  `void `fooConditionalDecl3a`();`

- `fooConditionalDecl3b`

  #### Declaration

  `void `fooConditionalDecl3b`();`

- `barConditionalDecl4a`

  #### Declaration

  `void `barConditionalDecl4a`();`

  #### Examples

  1. `int x4a;`
- `barConditionalDecl4b`

  #### Declaration

  `void `barConditionalDecl4b`();`

  #### Examples

  1. `int x4b;`
- `barConditionalDecl6a`

  #### Declaration

  `void `barConditionalDecl6a`();`

  #### Examples

  1. `int x6a;`
- `barConditionalDecl6b`

  #### Declaration

  `void `barConditionalDecl6b`();`

  #### Examples

  1. `int x6b;`
- `foo9474`

  #### Declaration

  `void `foo9474`();`

  #### Examples

  Example

  1. `foo9474();`
- `bar9474`

  #### Declaration

  `void `bar9474`();`

  doc

  #### Examples

  Example

  1. `bar9474();`
- `S9474`

  #### Declaration

  `struct `S9474`;`

  #### Examples

  1. `S9474 s;`
- `autovar9474`

  #### Declaration

  `int `autovar9474`;`

  #### Examples

  1. `int v = autovar9474;`
- `autofun9474`

  #### Declaration

  `auto `autofun9474`();`

  #### Examples

  1. `int n = autofun9474();`
- `Template9474`

  #### Declaration

  `template `Template9474`()`

  #### Examples

  1. `alias Template9474!() T;`
  - `foo`

    #### Declaration

    `void `foo`();`

    Shouldn't link following unittest to here

- `fooNoDescription`

  #### Declaration

  `void `fooNoDescription`();`

  #### Examples

  1. `fooNoDescription();`

  #### Examples

  1. `if (true) {fooNoDescription(); } /* comment */`
- `foo9757`

  #### Declaration

  `void `foo9757`();
  void `bar9757`();
  void `baz9757`();`

  test for https://issues.dlang.org/show_bug.cgi?id=9757

  #### Examples

  1. `foo9757(); bar9757();`

  #### Examples

  1. `bar9757(); foo9757();`
- `redBlackTree`

  #### Declaration

  `auto `redBlackTree`(E)(E[] `elems`...);
  auto `redBlackTree`(bool allowDuplicates, E)(E[] `elems`...);
  auto `redBlackTree`(alias less, E)(E[] `elems`...) if (__traits(compiles, (E a, E b) => mixin(less)));`

  with template functions

  #### Examples

  1. `auto rbt1 = redBlackTree(0, 1, 5, 7); auto rbt2 = redBlackTree!string("hello", "world"); auto rbt3 = redBlackTree!true(0, 1, 5, 7, 5); auto rbt4 = redBlackTree!"a > b"(0, 1, 5, 7);`
- `foo`

  #### Declaration

  `void `foo`();`

  test

  #### Examples

- `balancedParens10519`

  #### Declaration

  `bool `balancedParens10519`(string, char, char);`

  #### Examples

  1. `auto s = "1 + (2 * (3 + 1 / 2)"; assert(!balancedParens10519(s, '(', ')'));`
- `S12097`

  #### Declaration

  `struct `S12097`;
  void `f12097`();
  struct `T12097`(T);`

  declaration

  #### Examples

  ddoc code 1

  1. `int a = 1;`

  #### Examples

  ddoc code 2

  1. `int[] arr;`
  - `foo`

    #### Declaration

    `void `foo`();`

    method

- `fun14594a`

  #### Declaration

  `void `fun14594a`()();`

  testA

  #### Examples

  1. `fun14594a();`
- `fun14594b`

  #### Declaration

  `void `fun14594b`()();
  void `fun14594b`(T)(T);`

  testB

  #### Examples

  1. `fun14594b(); fun14594b(1);`
- `fun14594c`

  #### Declaration

  `void `fun14594c`()();
  void `fun14594c`(T)(T);`

  testC

  #### Examples

  1. `fun14594c(); fun14594c(1);`
- `fun14594d`

  #### Declaration

  `void `fun14594d`()();
  void `fun14594d`(T)(T);`

  testD

  #### Examples

  1. `fun14594d();`

  #### Examples

  1. `fun14594d(1);`
- `fun14594e`

  #### Declaration

  `void `fun14594e`()();`

  testE

  #### Discussion

  concatenated doc-comment `fun14594e`

  #### Examples

  doc-unittest `fun14594e`

  1. `fun14594e();`
- `fun14594f`

  #### Declaration

  `void `fun14594f`()();
  void `fun14594f`(T)(T);`

  testF

  #### Discussion

  concatenated doc-comment `fun14594f`

  #### Examples

  doc-unittest `fun14594f`

  1. `fun14594f();`