File: ok_deprecated_directive_note.pas

package info (click to toggle)
pasdoc 0.16.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,572 kB
  • sloc: pascal: 28,894; javascript: 7,665; xml: 2,597; makefile: 523; sh: 417
file content (41 lines) | stat: -rw-r--r-- 1,385 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ -*- compile-command: "fpc -vw ok_deprecated_directive_note.pas" -*- }
{$ifdef FPC}{$mode objfpc}{$H+}{$endif}

{ @abstract(Test deprecated directive with and without note.) }
unit ok_deprecated_directive_note deprecated 'Deprecation note for unit';

interface

procedure MyProc1; deprecated 'Deprecation note for procedure with some apostrophe: '' here you go:)';
procedure MyProc2; deprecated;
procedure MyProc3; deprecated #72#$65'llo'; //< Deprecated note should say 'Hello'. Handled Ok, we convert and sum string tokens correctly.

type
  TTestClass = class
    TestFieldDeprecated1: Integer deprecated 'Deprecation note for field';
    TestFieldDeprecated2: Integer deprecated;
    procedure MyMethod1; deprecated 'Deprecation note for procedure';
    procedure MyMethod2; deprecated;
    property TestProperty1: Integer; deprecated 'Deprecation note for property';
    property TestProperty2: Integer; deprecated;
  end;

  TTestClassDeprecated1 = class
  end deprecated 'Deprecation note for class';
  TTestClassDeprecated2 = class
  end deprecated;

const
  TestConstDeprecated1 = 1 deprecated 'Deprecation note for constant';
  TestConstDeprecated2 = 1 deprecated;

implementation

procedure MyProc1; begin end;
procedure MyProc2; begin MyProc3; end;
procedure MyProc3; begin end;

procedure TTestClass.MyMethod1; begin end;
procedure TTestClass.MyMethod2; begin end;

end.