Skip to content

Commit f74b6ae

Browse files
authored
Fix verb tense in test documentation (#3110)
## Motivation <!-- Briefly describe the goal(s) of this PR. --> Some tests were using "check" instead of "checks", which is different from the convention used everywhere else. ## Proposal <!-- Summarize the proposed changes and how they address the goal(s) stated above. --> Fix the documentation to use "checks". ## Test Plan <!-- Explain how you made sure that the changes are correct and that they perform as intended. Please describe testing protocols (CI, manual tests, benchmarks, etc) in a way that others can reproduce the results. --> Nothing needed, because this only affects documentation. ## Release Plan <!-- If this PR targets the `main` branch, **keep the applicable lines** to indicate if you recommend the changes to be picked in release branches, SDKs, and hotfixes. This generally concerns only bug fixes. Note that altering the public protocol (e.g. transaction format, WASM syscalls) or storage formats requires a new deployment. --> - Nothing to do, because this only affects documentation. ## Links <!-- Optional section for related PRs, related issues, and other references. If needed, please create issues to track future improvements and link them here. --> - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent e18b6d0 commit f74b6ae

File tree

9 files changed

+64
-64
lines changed

9 files changed

+64
-64
lines changed

linera-views/src/views/unit_tests/views.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ impl TestContextFactory for ScyllaDbContextFactory {
258258
}
259259
}
260260

261-
/// Check if a cloned view contains the staged changes from its source.
261+
/// Checks if a cloned view contains the staged changes from its source.
262262
#[test_case(PhantomData::<TestCollectionView<_>>; "with CollectionView")]
263263
#[test_case(PhantomData::<TestLogView<_>>; "with LogView")]
264264
#[test_case(PhantomData::<TestMapView<_>>; "with MapView")]
@@ -282,7 +282,7 @@ where
282282
Ok(())
283283
}
284284

285-
/// Check if new staged changes are separate between the cloned view and its source.
285+
/// Checks if new staged changes are separate between the cloned view and its source.
286286
#[test_case(PhantomData::<TestCollectionView<_>>; "with CollectionView")]
287287
#[test_case(PhantomData::<TestLogView<_>>; "with LogView")]
288288
#[test_case(PhantomData::<TestMapView<_>>; "with MapView")]
@@ -312,7 +312,7 @@ where
312312
Ok(())
313313
}
314314

315-
/// Check if the cached hash value persisted in storage is cleared when flushing a cleared
315+
/// Checks if the cached hash value persisted in storage is cleared when flushing a cleared
316316
/// [`HashableRegisterView`].
317317
///
318318
/// Otherwise `rollback` may set the cached staged hash value to an incorrect value.
@@ -381,7 +381,7 @@ async fn test_reentrant_collection_view_has_no_pending_changes_after_try_load_en
381381
Ok(())
382382
}
383383

384-
/// Check if a [`ReentrantCollectionView`] has pending changes after adding an entry.
384+
/// Checks if a [`ReentrantCollectionView`] has pending changes after adding an entry.
385385
#[tokio::test]
386386
async fn test_reentrant_collection_view_has_pending_changes_after_new_entry() -> anyhow::Result<()>
387387
{
@@ -405,7 +405,7 @@ async fn test_reentrant_collection_view_has_pending_changes_after_new_entry() ->
405405
Ok(())
406406
}
407407

408-
/// Check if a acquiring a write-lock to a sub-view causes the collection to have pending changes.
408+
/// Checks if a acquiring a write-lock to a sub-view causes the collection to have pending changes.
409409
#[tokio::test]
410410
async fn test_reentrant_collection_view_has_pending_changes_after_try_load_entry_mut(
411411
) -> anyhow::Result<()> {
@@ -437,7 +437,7 @@ async fn test_reentrant_collection_view_has_pending_changes_after_try_load_entry
437437
Ok(())
438438
}
439439

440-
/// Check if a acquiring multiple write-locks to sub-views causes the collection to have pending
440+
/// Checks if a acquiring multiple write-locks to sub-views causes the collection to have pending
441441
/// changes.
442442
#[tokio::test]
443443
async fn test_reentrant_collection_view_has_pending_changes_after_try_load_entries_mut(

linera-witty-macros/src/unit_tests/specialization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use syn::{parse_quote, DeriveInput, Ident};
99

1010
use super::{super::apply_specialization_attribute, Specialization, Specializations};
1111

12-
/// Check that the [`DeriveInput`] of a `struct` is changed.
12+
/// Checks that the [`DeriveInput`] of a `struct` is changed.
1313
#[test]
1414
fn derive_input_changes() {
1515
let mut input: DeriveInput = parse_quote! {
@@ -66,7 +66,7 @@ fn derive_input_changes() {
6666
);
6767
}
6868

69-
/// Check that [`Specialization`] generates correctly specialized [`Generics`].
69+
/// Checks that [`Specialization`] generates correctly specialized [`Generics`].
7070
#[test]
7171
fn generics_are_specialized() {
7272
let specializations = Specializations(vec![

linera-witty-macros/src/unit_tests/wit_load.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use syn::{parse_quote, Fields, ItemEnum, ItemStruct};
1010

1111
use super::{derive_for_enum, derive_for_struct};
1212

13-
/// Check the generated code for the body of the implementation of `WitLoad` for a unit struct.
13+
/// Checks the generated code for the body of the implementation of `WitLoad` for a unit struct.
1414
#[test]
1515
fn zero_sized_type() {
1616
let input = Fields::Unit;
@@ -51,7 +51,7 @@ fn zero_sized_type() {
5151
assert_eq!(output.to_string(), expected.to_string());
5252
}
5353

54-
/// Check the generated code for the body of the implementation of `WitLoad` for a named struct.
54+
/// Checks the generated code for the body of the implementation of `WitLoad` for a named struct.
5555
#[test]
5656
fn named_struct() {
5757
let input: ItemStruct = parse_quote! {
@@ -103,7 +103,7 @@ fn named_struct() {
103103
assert_eq!(output.to_string(), expected.to_string());
104104
}
105105

106-
/// Check the generated code for the body of the implementation of `WitLoad` for a tuple struct.
106+
/// Checks the generated code for the body of the implementation of `WitLoad` for a tuple struct.
107107
#[test]
108108
fn tuple_struct() {
109109
let input: ItemStruct = parse_quote! {
@@ -152,7 +152,7 @@ fn tuple_struct() {
152152
assert_eq!(output.to_string(), expected.to_string());
153153
}
154154

155-
/// Check the generated code for the body of the implementation of `WitType` for an enum.
155+
/// Checks the generated code for the body of the implementation of `WitType` for an enum.
156156
#[test]
157157
fn enum_type() {
158158
let input: ItemEnum = parse_quote! {
@@ -270,7 +270,7 @@ fn enum_type() {
270270
assert_eq!(output.to_string(), expected.to_string());
271271
}
272272

273-
/// Check the generated code for the body of the implementation of `WitLoad` for a named struct
273+
/// Checks the generated code for the body of the implementation of `WitLoad` for a named struct
274274
/// with some ignored fields.
275275
#[test]
276276
fn named_struct_with_skipped_fields() {
@@ -355,7 +355,7 @@ fn named_struct_with_skipped_fields() {
355355
assert_eq!(output.to_string(), expected.to_string());
356356
}
357357

358-
/// Check the generated code for the body of the implementation of `WitLoad` for a tuple struct
358+
/// Checks the generated code for the body of the implementation of `WitLoad` for a tuple struct
359359
/// with some ignored fields.
360360
#[test]
361361
fn tuple_struct_with_skipped_fields() {
@@ -419,7 +419,7 @@ fn tuple_struct_with_skipped_fields() {
419419
assert_eq!(output.to_string(), expected.to_string());
420420
}
421421

422-
/// Check the generated code for the body of the implementation of `WitType` for an enum with some
422+
/// Checks the generated code for the body of the implementation of `WitType` for an enum with some
423423
/// ignored fields.
424424
#[test]
425425
fn enum_type_with_skipped_fields() {

linera-witty-macros/src/unit_tests/wit_store.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use syn::{parse_quote, Fields, ItemEnum, ItemStruct};
1010

1111
use super::{derive_for_enum, derive_for_struct};
1212

13-
/// Check the generated code for the body of the implementation of `WitStore` for a unit struct.
13+
/// Checks the generated code for the body of the implementation of `WitStore` for a unit struct.
1414
#[test]
1515
fn zero_sized_type() {
1616
let input = Fields::Unit;
@@ -48,7 +48,7 @@ fn zero_sized_type() {
4848
assert_eq!(output.to_string(), expected.to_string());
4949
}
5050

51-
/// Check the generated code for the body of the implementation of `WitStore` for a named struct.
51+
/// Checks the generated code for the body of the implementation of `WitStore` for a named struct.
5252
#[test]
5353
fn named_struct() {
5454
let input: ItemStruct = parse_quote! {
@@ -91,7 +91,7 @@ fn named_struct() {
9191
assert_eq!(output.to_string(), expected.to_string());
9292
}
9393

94-
/// Check the generated code for the body of the implementation of `WitStore` for a tuple struct.
94+
/// Checks the generated code for the body of the implementation of `WitStore` for a tuple struct.
9595
#[test]
9696
fn tuple_struct() {
9797
let input: ItemStruct = parse_quote! {
@@ -131,7 +131,7 @@ fn tuple_struct() {
131131
assert_eq!(output.to_string(), expected.to_string());
132132
}
133133

134-
/// Check the generated code for the body of the implementation of `WitStore` for a enum.
134+
/// Checks the generated code for the body of the implementation of `WitStore` for a enum.
135135
#[test]
136136
fn enum_type() {
137137
let input: ItemEnum = parse_quote! {
@@ -235,7 +235,7 @@ fn enum_type() {
235235
assert_eq!(output.to_string(), expected.to_string());
236236
}
237237

238-
/// Check the generated code for the body of the implementation of `WitStore` for a named struct
238+
/// Checks the generated code for the body of the implementation of `WitStore` for a named struct
239239
/// with a single ignored fields.
240240
#[test]
241241
fn named_struct_with_one_skipped_field() {
@@ -281,7 +281,7 @@ fn named_struct_with_one_skipped_field() {
281281
assert_eq!(output.to_string(), expected.to_string());
282282
}
283283

284-
/// Check the generated code for the body of the implementation of `WitStore` for a named struct
284+
/// Checks the generated code for the body of the implementation of `WitStore` for a named struct
285285
/// with some ignored fields.
286286
#[test]
287287
fn named_struct_with_skipped_fields() {
@@ -333,7 +333,7 @@ fn named_struct_with_skipped_fields() {
333333
assert_eq!(output.to_string(), expected.to_string());
334334
}
335335

336-
/// Check the generated code for the body of the implementation of `WitStore` for a tuple struct
336+
/// Checks the generated code for the body of the implementation of `WitStore` for a tuple struct
337337
/// with some ignored fields.
338338
#[test]
339339
fn tuple_struct_with_skipped_fields() {
@@ -382,7 +382,7 @@ fn tuple_struct_with_skipped_fields() {
382382
assert_eq!(output.to_string(), expected.to_string());
383383
}
384384

385-
/// Check the generated code for the body of the implementation of `WitStore` for a enum with some
385+
/// Checks the generated code for the body of the implementation of `WitStore` for a enum with some
386386
/// ignored fields.
387387
#[test]
388388
fn enum_type_with_skipped_fields() {

linera-witty-macros/src/unit_tests/wit_type.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use syn::{parse_quote, Fields, ItemEnum, ItemStruct, LitStr};
1111

1212
use super::{derive_for_enum, derive_for_struct, discover_wit_name};
1313

14-
/// Check the generated code for the body of the implementation of `WitType` for a unit struct.
14+
/// Checks the generated code for the body of the implementation of `WitType` for a unit struct.
1515
#[test]
1616
fn zero_sized_type() {
1717
let input = Fields::Unit;
@@ -38,7 +38,7 @@ fn zero_sized_type() {
3838
assert_eq!(output.to_string(), expected.to_string());
3939
}
4040

41-
/// Check the generated code for the body of the implementation of `WitType` for a named struct.
41+
/// Checks the generated code for the body of the implementation of `WitType` for a named struct.
4242
#[test]
4343
fn named_struct() {
4444
let input: ItemStruct = parse_quote! {
@@ -83,7 +83,7 @@ fn named_struct() {
8383
assert_eq!(output.to_string(), expected.to_string());
8484
}
8585

86-
/// Check the generated code for the body of the implementation of `WitType` for a tuple struct.
86+
/// Checks the generated code for the body of the implementation of `WitType` for a tuple struct.
8787
#[test]
8888
fn tuple_struct() {
8989
let input: ItemStruct = parse_quote! {
@@ -134,7 +134,7 @@ fn tuple_struct() {
134134
assert_eq!(output.to_string(), expected.to_string());
135135
}
136136

137-
/// Check the generated code for the body of the implementation of `WitType` for an enum.
137+
/// Checks the generated code for the body of the implementation of `WitType` for an enum.
138138
#[test]
139139
fn enum_type() {
140140
let input: ItemEnum = parse_quote! {
@@ -249,7 +249,7 @@ fn enum_type() {
249249
assert_eq!(output.to_string(), expected.to_string());
250250
}
251251

252-
/// Check the generated code for the body of the implementation of `WitType` for a named struct
252+
/// Checks the generated code for the body of the implementation of `WitType` for a named struct
253253
/// with some ignored fields.
254254
#[test]
255255
fn named_struct_with_skipped_fields() {
@@ -303,7 +303,7 @@ fn named_struct_with_skipped_fields() {
303303
assert_eq!(output.to_string(), expected.to_string());
304304
}
305305

306-
/// Check the generated code for the body of the implementation of `WitType` for a tuple struct
306+
/// Checks the generated code for the body of the implementation of `WitType` for a tuple struct
307307
/// with some ignored fields.
308308
#[test]
309309
fn tuple_struct_with_skipped_fields() {
@@ -363,7 +363,7 @@ fn tuple_struct_with_skipped_fields() {
363363
assert_eq!(output.to_string(), expected.to_string());
364364
}
365365

366-
/// Check the generated code for the body of the implementation of `WitType` for an enum
366+
/// Checks the generated code for the body of the implementation of `WitType` for an enum
367367
/// with some ignored fields.
368368
#[test]
369369
fn enum_type_with_skipped_fields() {
@@ -485,7 +485,7 @@ fn enum_type_with_skipped_fields() {
485485
assert_eq!(output.to_string(), expected.to_string());
486486
}
487487

488-
/// Check the generated code for the body of the implementation of `WitType` for a struct
488+
/// Checks the generated code for the body of the implementation of `WitType` for a struct
489489
/// with a custom WIT type name.
490490
#[test]
491491
fn struct_with_a_custom_wit_name() {

linera-witty/src/runtime/unit_tests/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use super::GuestPointer;
77

88
/// Test aligning memory addresses.
99
///
10-
/// Check that the resulting address is aligned and that it never advances more than the alignment
10+
/// Checks that the resulting address is aligned and that it never advances more than the alignment
1111
/// amount.
1212
#[test]
1313
fn align_guest_pointer() {

linera-witty/tests/wit_load.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use self::types::{
1717
TupleWithoutPadding,
1818
};
1919

20-
/// Check that a wrapper type is properly loaded from memory and lifted from its flat layout.
20+
/// Checks that a wrapper type is properly loaded from memory and lifted from its flat layout.
2121
#[test]
2222
fn test_simple_bool_wrapper() {
2323
test_load_from_memory(&[1], SimpleWrapper(true));
@@ -27,7 +27,7 @@ fn test_simple_bool_wrapper() {
2727
test_lift_from_flat_layout(hlist![0], SimpleWrapper(false), &[]);
2828
}
2929

30-
/// Check that a type with multiple fields ordered in a way that doesn't require any padding is
30+
/// Checks that a type with multiple fields ordered in a way that doesn't require any padding is
3131
/// properly loaded from memory and lifted from its flat layout.
3232
#[test]
3333
fn test_tuple_struct_without_padding() {
@@ -44,7 +44,7 @@ fn test_tuple_struct_without_padding() {
4444
);
4545
}
4646

47-
/// Check that a type with multiple fields ordered in a way that requires padding between two of its
47+
/// Checks that a type with multiple fields ordered in a way that requires padding between two of its
4848
/// fields is properly loaded from memory and lifted from its flat layout.
4949
#[test]
5050
fn test_tuple_struct_with_padding() {
@@ -61,7 +61,7 @@ fn test_tuple_struct_with_padding() {
6161
);
6262
}
6363

64-
/// Check that a type with multiple named fields ordered in a way that requires padding before two
64+
/// Checks that a type with multiple named fields ordered in a way that requires padding before two
6565
/// fields is properly loaded from memory and lifted from its flat layout.
6666
#[test]
6767
fn test_named_struct_with_double_padding() {
@@ -90,7 +90,7 @@ fn test_named_struct_with_double_padding() {
9090
);
9191
}
9292

93-
/// Check that a type that contains a field with a type that also has `WitStore` derived for it is
93+
/// Checks that a type that contains a field with a type that also has `WitStore` derived for it is
9494
/// properly loaded from memory and lifted from its flat layout.
9595
#[test]
9696
fn test_nested_types() {
@@ -129,7 +129,7 @@ fn test_nested_types() {
129129
);
130130
}
131131

132-
/// Check that an enum type's variants are properly loaded from memory and lifted from its flat
132+
/// Checks that an enum type's variants are properly loaded from memory and lifted from its flat
133133
/// layout.
134134
#[test]
135135
fn test_enum_type() {
@@ -184,7 +184,7 @@ fn test_enum_type() {
184184
);
185185
}
186186

187-
/// Check that a generic type with a specialization request is properly loaded from memory and
187+
/// Checks that a generic type with a specialization request is properly loaded from memory and
188188
/// lifted from its flat layout.
189189
#[test]
190190
fn test_specialized_generic_struct() {
@@ -207,7 +207,7 @@ fn test_specialized_generic_struct() {
207207
);
208208
}
209209

210-
/// Check that a generic enum with a specialization request type's variants are properly loaded
210+
/// Checks that a generic enum with a specialization request type's variants are properly loaded
211211
/// from memory and lifted from its flat layout.
212212
#[test]
213213
fn test_specialized_generic_enum_type() {
@@ -244,7 +244,7 @@ fn test_specialized_generic_enum_type() {
244244
test_lift_from_flat_layout(hlist![2_i32, 1_i32, 0x0c0b_0a09_i32], expected, &[]);
245245
}
246246

247-
/// Check that an invalid discriminant reports a useful error.
247+
/// Checks that an invalid discriminant reports a useful error.
248248
#[test]
249249
fn test_invalid_discriminant() {
250250
let mut instance = MockInstance::<()>::default();
@@ -308,7 +308,7 @@ fn test_invalid_discriminant() {
308308
);
309309
}
310310

311-
/// Check that a type with fields stored in the heap is properly loaded from memory and lifted from
311+
/// Checks that a type with fields stored in the heap is properly loaded from memory and lifted from
312312
/// its flat layout.
313313
#[test]
314314
fn test_heap_allocated_fields() {
@@ -354,7 +354,7 @@ fn test_heap_allocated_fields() {
354354
);
355355
}
356356

357-
/// Check that a [`Vec`] type is properly loaded from memory and lifted from its flat
357+
/// Checks that a [`Vec`] type is properly loaded from memory and lifted from its flat
358358
/// layout.
359359
#[test]
360360
fn test_vec() {
@@ -364,7 +364,7 @@ fn test_vec() {
364364
test_lift_from_flat_layout(hlist![0_i32, 2_i32], expected, &[0, 1]);
365365
}
366366

367-
/// Check that a type with list fields is properly loaded from memory and lifted from its
367+
/// Checks that a type with list fields is properly loaded from memory and lifted from its
368368
/// flat layout.
369369
#[test]
370370
fn test_list_fields() {

0 commit comments

Comments
 (0)