File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
frb_codegen/src/library/codegen/generator
wire/dart/spec_generator/wire_class/io Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,15 @@ pub(crate) fn generate_codec_comments(codec: CodecMode) -> String {
99 } ;
1010 format ! ( "// Codec={codec} ({brief_explanation}), see doc to use other codecs" )
1111}
12+
13+ #[ cfg( test) ]
14+ mod tests {
15+ use super :: * ;
16+ #[ test]
17+ fn test_generate_codec_comments ( ) {
18+ assert_eq ! (
19+ & generate_codec_comments( CodecMode :: Pde ) ,
20+ "// Codec=Pde (Serialization + dispatch), see doc to use other codecs" ,
21+ ) ;
22+ }
23+ }
Original file line number Diff line number Diff line change @@ -72,8 +72,11 @@ fn generate_func(func: &ExternFunc, c_symbol_prefix: &str) -> String {
7272 "
7373 )
7474 } else {
75+ // This will stop the whole generator and tell the users, so we do not care about testing it
76+ // frb-coverage:ignore-start
7577 unreachable ! (
7678 "Do not understand how to generate this func without ffigen yet (func={func:?})"
7779 )
80+ // frb-coverage:ignore-end
7881 }
7982}
You can’t perform that action at this time.
0 commit comments