Skip to content

Commit 8d78bd4

Browse files
fix
1 parent cc33514 commit 8d78bd4

File tree

1 file changed

+36
-1
lines changed
  • codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil

1 file changed

+36
-1
lines changed

codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt

+36-1
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,49 @@ private object Commands {
6666
)
6767
}
6868

69-
// --all-features
69+
// enable all features
70+
// e.g.
71+
// ```kotlin
72+
// cargoTest(true)
73+
// // cargo test --all-features
74+
// cargoTest(false)
75+
// // cargo test
76+
// ```
7077
fun cargoTest(enableAllFeatures: Boolean): String {
7178
return func("cargo test", allFeature, enableAllFeatures)
7279
}
7380

81+
// enable all features
82+
// e.g.
83+
// ```kotlin
84+
// cargoCheck(true)
85+
// // cargo test --all-features
86+
// cargoCheck(false)
87+
// // cargo test
88+
// ```
7489
fun cargoCheck(enableAllFeatures: Boolean): String {
7590
return func("cargo check", allFeature, enableAllFeatures)
7691
}
92+
93+
// enable features specified in the array
94+
// e.g.
95+
// ```kotlin
96+
// cargoTest(["serde-serialize", "serde-deserialize"])
97+
// // cargo test --features serde-serialize serde-deserialize
98+
// ```
99+
fun cargoTest(featuresToEnable?: Array<String>): String {
100+
return func("cargo test", allFeature, enableAllFeatures)
101+
}
102+
103+
// enable features specified in the array
104+
// e.g.
105+
// ```kotlin
106+
// cargoCheck(["serde-serialize", "serde-deserialize"])
107+
// // cargo check --features serde-serialize serde-deserialize
108+
// ```
109+
fun cargoCheck(featuresToEnable?: Array<String>): String {
110+
return func("cargo check", allFeature, enableAllFeatures)
111+
}
77112
}
78113

79114
val TestModuleDocProvider = object : ModuleDocProvider {

0 commit comments

Comments
 (0)