diff options
author | Andrea Barberio <insomniac@slackware.it> | 2018-05-20 00:52:33 +0100 |
---|---|---|
committer | Andrea Barberio <insomniac@slackware.it> | 2018-05-20 00:52:33 +0100 |
commit | bdb0bf25259985b962e230fbac5265a7623afd05 (patch) | |
tree | 6af1ea7e3dbf3b6b4e370e932f6675379b5439e7 /dhcpv6/option_elapsedtime_test.go | |
parent | 5e40d13e338c363f111c326987b14023db25c40d (diff) |
OptIANA and OptElapsedTime now have public fields
Diffstat (limited to 'dhcpv6/option_elapsedtime_test.go')
-rw-r--r-- | dhcpv6/option_elapsedtime_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dhcpv6/option_elapsedtime_test.go b/dhcpv6/option_elapsedtime_test.go index 8e99fa8..69e879c 100644 --- a/dhcpv6/option_elapsedtime_test.go +++ b/dhcpv6/option_elapsedtime_test.go @@ -13,7 +13,7 @@ func TestOptElapsedTime(t *testing.T) { if optLen := opt.Length(); optLen != 2 { t.Fatalf("Invalid length. Expected 2, got %v", optLen) } - if elapsedTime := opt.ElapsedTime(); elapsedTime != 0xaabb { + if elapsedTime := opt.ElapsedTime; elapsedTime != 0xaabb { t.Fatalf("Invalid elapsed time. Expected 0xaabb, got %v", elapsedTime) } } @@ -28,15 +28,15 @@ func TestOptElapsedTimeToBytes(t *testing.T) { func TestOptElapsedTimeSetGetElapsedTime(t *testing.T) { opt := OptElapsedTime{} - opt.SetElapsedTime(10) - if elapsedTime := opt.ElapsedTime(); elapsedTime != 10 { + opt.ElapsedTime = 10 + if elapsedTime := opt.ElapsedTime; elapsedTime != 10 { t.Fatalf("Invalid elapsed time. Expected 10, got %v", elapsedTime) } } func TestOptElapsedTimeString(t *testing.T) { opt := OptElapsedTime{} - opt.SetElapsedTime(10) + opt.ElapsedTime = 10 expected := "OptElapsedTime{elapsedtime=10}" if optString := opt.String(); optString != expected { t.Fatalf("Invalid elapsed time string. Expected %v, got %v", expected, optString) |