File tree 3 files changed +24
-5
lines changed
3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -67,11 +67,12 @@ jobs:
67
67
run : cargo doc --verbose
68
68
- name : Run SIMD/no-SIMD tests
69
69
run : |
70
+ # See crosstest/main.rs for more info on the test
70
71
cd crosstest
71
- # Create some no-simd test files
72
+ # Create a no-simd test file in /tmp
72
73
cargo run --verbose --features no_simd -- write
73
74
cargo clean
74
- # Create some simd test files and test the no-simd files
75
+ # Create a simd-enabled test file and test the no-simd file
75
76
cargo run --verbose -- write read
76
77
cargo clean
77
78
# Test the simd-enabled files we generated in the last step
Original file line number Diff line number Diff line change 1
1
// This test makes sure that a hash table generated with SIMD support
2
- // can be loaded on a platform without SIMD support.
2
+ // can be loaded on a platform without SIMD support and vice versa.
3
+ //
4
+ // It works this way:
5
+ //
6
+ // The executable has two options: "write" and "read". When "write" is
7
+ // enabled, it will write a hashtable to /tmp. When "read" is enabled,
8
+ // it will try to read a hashtable from /tmp and verify that it contains
9
+ // the expected data.
10
+ //
11
+ // We compile the executable two times, once with and once without SIMD
12
+ // support. With both versions we generate a hashtable in /tmp and then
13
+ // try to load and verify that hashtable with the respective other
14
+ // version of the executable, that is, the SIMD-version will try to load
15
+ // the non-SIMD version and vice versa.
16
+ //
17
+ // See .github/workflows/ci.yml for how this is used.
3
18
4
19
struct FxConfig ;
5
20
Original file line number Diff line number Diff line change @@ -62,8 +62,11 @@ impl Header {
62
62
63
63
if raw_bytes. len ( ) != bytes_needed :: < C > ( self . slot_count ( ) ) {
64
64
return Err ( Error ( format ! (
65
- "Provided allocation has wrong size for slot count {}" ,
66
- self . slot_count( )
65
+ "Provided allocation has wrong size for slot count {}. \
66
+ The allocation's size is {} but the expected size is {}.",
67
+ self . slot_count( ) ,
68
+ raw_bytes. len( ) ,
69
+ bytes_needed:: <C >( self . slot_count( ) ) ,
67
70
) ) ) ;
68
71
}
69
72
You can’t perform that action at this time.
0 commit comments