diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-03-15 12:48:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-15 09:48:20 -0700 |
| commit | b6de9a0091ab6a7414b46c7eb50f25b9512fb455 (patch) | |
| tree | adc37f1942d848446182f0dbb72dd1f487dbb587 /tests/doc/doc.slang.expected | |
| parent | d8150e70612b58fb1cfefa262d3d862a6e6e79ba (diff) | |
Test Doc System (#1754)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Use capability system in docs.
Simplify how requirements/availability is produced.
* Small fixes in output of availablity.
* Updated stdlib doc.
* Small improvements.
* Added doc test type.
Improved readability of straight .md text
Made -doc option output to diagnostic stream.
* Add test for checking requirements info is correctly extracted.
Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'tests/doc/doc.slang.expected')
| -rw-r--r-- | tests/doc/doc.slang.expected | 375 |
1 files changed, 375 insertions, 0 deletions
diff --git a/tests/doc/doc.slang.expected b/tests/doc/doc.slang.expected new file mode 100644 index 000000000..95b3381b5 --- /dev/null +++ b/tests/doc/doc.slang.expected @@ -0,0 +1,375 @@ +result code = 0 +standard error = { +-------------------------------------------------------------------------------- +# `outFunc` + +## Signature + +``` +void outFunc(out int v); +``` + +## Parameters + +* `v` + +-------------------------------------------------------------------------------- +# `struct ParentStruct<T>` + +## Description + +Testing out nested generics + +## Generic Parameters + +* `T` Some type + +-------------------------------------------------------------------------------- +# `struct ParentStruct<T>.ChildStruct<S>` + +## Description + +Testing out a child + +## Generic Parameters + +* `S` Some other type + +## Methods + +* `getValue` + +-------------------------------------------------------------------------------- +# `ParentStruct<T>.ChildStruct<S>.getValue` + +## Description + +A useless method hey ho + +## Signature + +``` +T ParentStruct<T>.ChildStruct<S>.getValue(S v); +``` + +## Parameters + +* `v` + +-------------------------------------------------------------------------------- +# `struct GenericStruct<T>` + +## Generic Parameters + +* `T` + +## Fields + +* `value` + +## Methods + +* `getValue` + +-------------------------------------------------------------------------------- +# `GenericStruct<T>.getValue` + +## Signature + +``` +T GenericStruct<T>.getValue(); +``` + +-------------------------------------------------------------------------------- +# `addInts` + +## Description + +A rather silly generic function to test out doc extraction + +## Signature + +``` +T addInts<T, U:int, V:int>( + T z, + T b); +``` + +## Parameters + +* `T` The type we are operating on +* `U` Just testing out a non type based generic +* `V` And another one +* `z` CHECKING!! +* `b` The B parameter + +-------------------------------------------------------------------------------- +# `Hey::doAnotherThing` + +## Signature + +``` +void Hey::doAnotherThing(int a); +``` + +## Parameters + +* `a` + +-------------------------------------------------------------------------------- +# inputBuffer + +``` +RWStructuredBuffer inputBuffer +``` + +## Description + +Let's test indent + +``` +{ + imIndented(); +} +``` + +-------------------------------------------------------------------------------- +# `interface IDoThing` + +## Description + +An interface to do things + +# Associated types + +* _V_ An associated type + + +## Methods + +* `add` +* `sub` + +-------------------------------------------------------------------------------- +# `IDoThing.add` + +## Description + +Add two integers + +## Signature + +``` +V IDoThing.add( + V a, + V b); +``` + +## Parameters + +* `a` First parameter +* `b` Second parameter + +-------------------------------------------------------------------------------- +# `IDoThing.sub` + +## Description + +Subtract +Multi-line + +## Signature + +``` +int IDoThing.sub( + int a, + int b); +``` + +## Parameters + +* `a` First +* `b` Second + +-------------------------------------------------------------------------------- +# `interface IThing` + +## Methods + +* `getValue` + +-------------------------------------------------------------------------------- +# `IThing.getValue` + +## Signature + +``` +float IThing.getValue(); +``` + +-------------------------------------------------------------------------------- +# `extension float : IThing` + +*Implements:* `IThing` + +## Description + +Implement IThing on float + +## Methods + +* `getValue` + +-------------------------------------------------------------------------------- +# `float.getValue` + +## Description + +Just return the float itself! + +## Signature + +``` +float float.getValue(); +``` + +-------------------------------------------------------------------------------- +# `struct Thing` + +*Implements:* `IThing`, `IDoThing` + +## Methods + +* `add` +* `sub` +* `getValue` + +-------------------------------------------------------------------------------- +# `Thing.add` + +## Signature + +``` +int Thing.add( + int a, + int b); +``` + +## Parameters + +* `a` +* `b` + +-------------------------------------------------------------------------------- +# `Thing.sub` + +## Signature + +``` +int Thing.sub( + int a, + int b); +``` + +## Parameters + +* `a` +* `b` + +-------------------------------------------------------------------------------- +# `Thing.getValue` + +## Signature + +``` +float Thing.getValue(); +``` + +-------------------------------------------------------------------------------- +# `struct SomeStruct` + +## Description + +A struct with some fields + +## Fields + +* `aField` A field +* `anotherField` Multi-line is a thing +* `yetAnother` A field with stuff + +## Methods + +* `getMethod` + +-------------------------------------------------------------------------------- +# `SomeStruct.getMethod` + +## Description + +Get a value + +## Signature + +``` +int SomeStruct.getMethod(); +``` + +-------------------------------------------------------------------------------- +# enum AnEnum + +## Values + +* _Value_ A value +* _AnotherValue_ Another value With a multi-line comment +## Description + +An enum + +-------------------------------------------------------------------------------- +# outputBuffer + +``` +RWStructuredBuffer outputBuffer +``` + +## Description + +An output buffer + +-------------------------------------------------------------------------------- +# `doThing` + +## Description + +doThing! + +## Signature + +``` +int doThing( + int a, + int b); +``` + +## Parameters + +* `a` a parameter +* `b` b parameter + +-------------------------------------------------------------------------------- +# `computeMain` + +## Signature + +``` +void computeMain(vector<uint,3> dispatchThreadID); +``` + +## Parameters + +* `dispatchThreadID` + +} +standard output = { +} |
