Skip to content

Commit

Permalink
Update scarb-doc test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
maciektr committed Oct 7, 2024
1 parent dccc64b commit 8eb1417
Show file tree
Hide file tree
Showing 29 changed files with 282 additions and 249 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Circle struct with radius field


Fully qualified path: `hello_world::Circle`

## Members
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Implementation of the Shape trait for Circle


Fully qualified path: `hello_world::CircleShape`

```rust
Expand All @@ -14,7 +15,8 @@ impl CircleShape of Shape<Circle>

Shape constant

Fully qualified path: `hello_world::hello_world::CircleShape::SHAPE_CONST`

Fully qualified path: `hello_world::CircleShape::SHAPE_CONST`

```rust
const SHAPE_CONST: felt252 = 'xyz';
Expand All @@ -27,6 +29,7 @@ const SHAPE_CONST: felt252 = 'xyz';

Implementation of the area method for Circle


Fully qualified path: `hello_world::CircleShape::area`

```rust
Expand All @@ -40,7 +43,8 @@ fn area(self: Circle) -> u32

Type alias for a pair of circles

Fully qualified path: `hello_world::hello_world::CircleShape::ShapePair`

Fully qualified path: `hello_world::CircleShape::ShapePair`

```rust
type ShapePair = (Circle, Circle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Color enum with Red, Green, and Blue variants


Fully qualified path: `hello_world::Color`

## Variants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

FOO constant with value 42


Fully qualified path: `hello_world::FOO`

```rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Pair type alias for a tuple of two u32 values


Fully qualified path: `hello_world::Pair`

```rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Shape trait for objects that have an area


Fully qualified path: `hello_world::Shape`

```rust
Expand All @@ -14,11 +15,8 @@ trait Shape<T>

Constant for the shape type

Fully qualified path: `hello_world::hello_world::Shape::SHAPE_CONST`

```rust
const SHAPE_CONST: felt252;
```
Fully qualified path: `hello_world::Shape::SHAPE_CONST`


## Trait functions
Expand All @@ -27,6 +25,7 @@ const SHAPE_CONST: felt252;

Calculate the area of the shape


Fully qualified path: `Shape::area`

```rust
Expand All @@ -40,10 +39,7 @@ fn area(self: T) -> u32

Type alias for a pair of shapes

Fully qualified path: `hello_world::hello_world::Shape::ShapePair`

```rust
type ShapePair;
```
Fully qualified path: `hello_world::Shape::ShapePair`


Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# fib

Calculate the nth Fibonacci number # Arguments * `n` - The index of the Fibonacci number to calculate
Calculate the nth Fibonacci number

# Arguments
* `n` - The index of the Fibonacci number to calculate


Fully qualified path: `hello_world::fib`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Main function that calculates the 16th Fibonacci number


Fully qualified path: `hello_world::main`

```rust
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# it_works

Really
works.


Fully qualified path: `hello_world::tests::it_works`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Tests module


Fully qualified path: `hello_world::tests`

## Free functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Main function that cairo runs as a binary entrypoint.


Fully qualified path: `hello_world_sub_package::main`

```rust
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# test

Function that prints "test" to stdout with endline. Can invoke it like that:
Function that prints "test" to stdout with endline.
Can invoke it like that:
```cairo
fn main() {
test();
}
```


Fully qualified path: `hello_world_sub_package::test`

```rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Main function that cairo runs as a binary entrypoint.


Fully qualified path: `hello_world_sub_package::main`

```rust
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# test

Function that prints "test" to stdout with endline. Can invoke it like that:
Function that prints "test" to stdout with endline.
Can invoke it like that:
```cairo
fn main() {
test();
}
```
This is a under feature attribute comment.


Fully qualified path: `hello_world_sub_package::test`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Circle struct with radius field


Fully qualified path: `hello_world::Circle`

## Members
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Implementation of the Shape trait for Circle


Fully qualified path: `hello_world::CircleShape`

```rust
Expand All @@ -14,7 +15,8 @@ impl CircleShape of Shape<Circle>

Shape constant

Fully qualified path: `hello_world::hello_world::CircleShape::SHAPE_CONST`

Fully qualified path: `hello_world::CircleShape::SHAPE_CONST`

```rust
const SHAPE_CONST: felt252 = 'xyz';
Expand All @@ -27,6 +29,7 @@ const SHAPE_CONST: felt252 = 'xyz';

Implementation of the area method for Circle


Fully qualified path: `hello_world::CircleShape::area`

```rust
Expand All @@ -40,7 +43,8 @@ fn area(self: Circle) -> u32

Type alias for a pair of circles

Fully qualified path: `hello_world::hello_world::CircleShape::ShapePair`

Fully qualified path: `hello_world::CircleShape::ShapePair`

```rust
type ShapePair = (Circle, Circle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Color enum with Red, Green, and Blue variants


Fully qualified path: `hello_world::Color`

## Variants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

FOO constant with value 42


Fully qualified path: `hello_world::FOO`

```rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Pair type alias for a tuple of two u32 values


Fully qualified path: `hello_world::Pair`

```rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Shape trait for objects that have an area


Fully qualified path: `hello_world::Shape`

```rust
Expand All @@ -14,11 +15,8 @@ trait Shape<T>

Constant for the shape type

Fully qualified path: `hello_world::hello_world::Shape::SHAPE_CONST`

```rust
const SHAPE_CONST: felt252;
```
Fully qualified path: `hello_world::Shape::SHAPE_CONST`


## Trait functions
Expand All @@ -27,6 +25,7 @@ const SHAPE_CONST: felt252;

Calculate the area of the shape


Fully qualified path: `Shape::area`

```rust
Expand All @@ -40,10 +39,7 @@ fn area(self: T) -> u32

Type alias for a pair of shapes

Fully qualified path: `hello_world::hello_world::Shape::ShapePair`

```rust
type ShapePair;
```
Fully qualified path: `hello_world::Shape::ShapePair`


Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# fib

Calculate the nth Fibonacci number # Arguments * `n` - The index of the Fibonacci number to calculate
Calculate the nth Fibonacci number

# Arguments
* `n` - The index of the Fibonacci number to calculate


Fully qualified path: `hello_world::fib`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Main function that calculates the 16th Fibonacci number


Fully qualified path: `hello_world::main`

```rust
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# test

Function that prints "test" to stdout with endline. Can invoke it like that:
Function that prints "test" to stdout with endline.
Can invoke it like that:
```cairo
fn main() {
test();
}
```


Fully qualified path: `hello_world::test`

```rust
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# it_works

Really
works.


Fully qualified path: `hello_world::tests::it_works`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Tests module


Fully qualified path: `hello_world::tests`

## Free functions
Expand Down
2 changes: 1 addition & 1 deletion extensions/scarb-doc/tests/data/json_doc_hidden.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"item_data": {
"name": "main",
"doc": "main",
"doc": "main\n",
"signature": "fn main()",
"full_path": "hello_world::main"
}
Expand Down
Loading

0 comments on commit 8eb1417

Please sign in to comment.