@@ -7,8 +7,13 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
crunch-traits.workspace = true
|
||||
crunch-file.workspace = true
|
||||
|
||||
anyhow.workspace = true
|
||||
tracing.workspace = true
|
||||
tokio.workspace = true
|
||||
async-trait.workspace = true
|
||||
prost.workspace = true
|
||||
prost-types.workspace = true
|
||||
prost-build.workspace = true
|
||||
bytes.workspace = true
|
||||
|
@@ -1,14 +1,15 @@
|
||||
pub fn add(left: usize, right: usize) -> usize {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
#[tokio::test]
|
||||
async fn test_can_generate_output_rust() {
|
||||
let proto_spec = r#"
|
||||
syntax = "proto3";
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
package test.can.generate.output.rust;
|
||||
|
||||
message MyEvent {
|
||||
string name = 1;
|
||||
}
|
||||
"#;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user