From e5f433a0f5d40b725966c8f0b8a550dd5f19c871 Mon Sep 17 00:00:00 2001 From: SoulKa Date: Tue, 16 Jan 2024 14:52:56 +0100 Subject: [PATCH] remove opts from test case --- aht20/aht20_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/aht20/aht20_test.go b/aht20/aht20_test.go index 6cae619..3ef3a79 100644 --- a/aht20/aht20_test.go +++ b/aht20/aht20_test.go @@ -125,7 +125,6 @@ func TestDev_Sense_error(t *testing.T) { type TestCase struct { name string data []byte - opts Opts error error } @@ -133,13 +132,11 @@ func TestDev_Sense_error(t *testing.T) { { name: "data corrupt", data: []byte{byteStatusInitialized, 0x75, 0x52, 0x05, 0x8E, 0x40, 0x7E}, - opts: DefaultOpts, error: &DataCorruptionError{0x7F, 0x7E}, }, { name: "not initialized", data: []byte{0x00, 0x75, 0x52, 0x05, 0x8E, 0x40, 0x20}, - opts: DefaultOpts, error: &NotInitializedError{}, }, } @@ -154,7 +151,7 @@ func TestDev_Sense_error(t *testing.T) { {Addr: deviceAddress, R: tc.data}, }, } - dev := Dev{d: &i2c.Dev{Bus: &bus, Addr: deviceAddress}, opts: tc.opts} + dev := Dev{d: &i2c.Dev{Bus: &bus, Addr: deviceAddress}, opts: DefaultOpts} e := physic.Env{} if err := dev.Sense(&e); err == nil { t.Fatal("expected error")