File tree Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -309,6 +309,24 @@ jobs:
309309 GIX_TEST_IGNORE_ARCHIVES : ' 1'
310310 run : cargo nextest run --workspace --no-fail-fast
311311
312+ test-32bit-windows-size :
313+ runs-on : windows-latest
314+
315+ env :
316+ TARGET : i686-pc-windows-msvc
317+
318+ steps :
319+ - uses : actions/checkout@v4
320+ - uses : dtolnay/rust-toolchain@stable
321+ with :
322+ targets : ${{ env.TARGET }}
323+ - uses : Swatinem/rust-cache@v2
324+ - uses : taiki-e/install-action@v2
325+ with :
326+ tool : nextest
327+ - name : Test (nextest)
328+ run : cargo nextest run --target $env:TARGET --workspace --no-fail-fast size
329+
312330 lint :
313331 runs-on : ubuntu-latest
314332
@@ -504,6 +522,7 @@ jobs:
504522 - test-fast
505523 - test-fixtures-windows
506524 - test-32bit
525+ - test-32bit-windows-size
507526 - lint
508527 - cargo-deny
509528 - check-packetline
Original file line number Diff line number Diff line change 11use gix_hash:: { Hasher , ObjectId } ;
2+ use gix_testtools:: size_ok;
23
34#[ test]
45fn size_of_hasher ( ) {
5- assert_eq ! (
6- std:: mem:: size_of:: <Hasher >( ) ,
7- if cfg!( target_arch = "x86" ) { 820 } else { 824 } ,
8- "The size of this type may be relevant when hashing millions of objects,\
9- and shouldn't change unnoticed. The DetectionState alone clocks in at 724 bytes."
6+ let actual = std:: mem:: size_of :: < Hasher > ( ) ;
7+ let expected = 824 ;
8+ assert ! (
9+ size_ok( actual, expected) ,
10+ "The size of this type may be relevant when hashing millions of objects, and shouldn't\
11+ change unnoticed: {actual} <~ {expected}\
12+ (The DetectionState alone clocked in at 724 bytes when last examined.)"
1013 ) ;
1114}
1215
You can’t perform that action at this time.
0 commit comments