File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 11use bls12_381:: G1Projective as G ;
2- use core:: str;
32use hex:: FromHex ;
43use json:: JsonValue ;
54use std:: collections:: HashMap ;
6- use std:: fs;
75
86use crate :: codec:: KeccakByteSchnorrCodec ;
97use crate :: fiat_shamir:: Nizk ;
@@ -27,7 +25,7 @@ struct TestVector {
2725#[ test]
2826fn test_spec_testvectors ( ) {
2927 let proof_generation_rng_seed = b"proof_generation_seed" ;
30- let vectors = extract_vectors_new ( "src/tests/spec/vectors/testSigmaProtocols.json" ) . unwrap ( ) ;
28+ let vectors = extract_vectors_new ( ) . unwrap ( ) ;
3129
3230 // Define supported ciphersuites
3331 let mut supported_ciphersuites = HashMap :: new ( ) ;
@@ -110,11 +108,11 @@ fn test_spec_testvectors() {
110108 }
111109}
112110
113- fn extract_vectors_new ( path : & str ) -> Result < HashMap < String , TestVector > , String > {
111+ fn extract_vectors_new ( ) -> Result < HashMap < String , TestVector > , String > {
114112 use std:: collections:: HashMap ;
115113
116- let content = fs :: read_to_string ( path ) . map_err ( |e| format ! ( "Unable to read JSON file: {e}" ) ) ? ;
117- let root: JsonValue = json:: parse ( & content) . map_err ( |e| format ! ( "JSON parsing error: {e}" ) ) ?;
114+ let content = include_str ! ( "./vectors/testSigmaProtocols.json" ) ;
115+ let root: JsonValue = json:: parse ( content) . map_err ( |e| format ! ( "JSON parsing error: {e}" ) ) ?;
118116
119117 let mut vectors = HashMap :: new ( ) ;
120118
You can’t perform that action at this time.
0 commit comments