From fb97d9d25d8b7707fff38422400e38a9603257dc Mon Sep 17 00:00:00 2001 From: Marc-Antoine Ruel Date: Tue, 30 Oct 2018 15:42:40 -0400 Subject: [PATCH] testing.T.Run was introduced in Go 1.7, not Go 1.8 Make tests that were locked on 1.8 to run on Go 1.7. Fix ina219 tests to only compile on Go 1.7 since it uses testing.t.Run(). --- .../cap1xxx/{cap1xxx_go1_8_test.go => cap1xxx_go1_7_test.go} | 2 +- .../devices/ina219/{ina219_test.go => ina219_go1_7_test.go} | 2 ++ .../nrzled/{nrzled_go1_8_test.go => nrzled_go1_7_test.go} | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) rename devices/cap1xxx/{cap1xxx_go1_8_test.go => cap1xxx_go1_7_test.go} (99%) rename experimental/devices/ina219/{ina219_test.go => ina219_go1_7_test.go} (99%) rename experimental/devices/nrzled/{nrzled_go1_8_test.go => nrzled_go1_7_test.go} (97%) diff --git a/devices/cap1xxx/cap1xxx_go1_8_test.go b/devices/cap1xxx/cap1xxx_go1_7_test.go similarity index 99% rename from devices/cap1xxx/cap1xxx_go1_8_test.go rename to devices/cap1xxx/cap1xxx_go1_7_test.go index 86d2060..3ff6b08 100644 --- a/devices/cap1xxx/cap1xxx_go1_8_test.go +++ b/devices/cap1xxx/cap1xxx_go1_7_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. -// +build go1.8 +// +build go1.7 package cap1xxx diff --git a/experimental/devices/ina219/ina219_test.go b/experimental/devices/ina219/ina219_go1_7_test.go similarity index 99% rename from experimental/devices/ina219/ina219_test.go rename to experimental/devices/ina219/ina219_go1_7_test.go index 02e84ce..83e2226 100644 --- a/experimental/devices/ina219/ina219_test.go +++ b/experimental/devices/ina219/ina219_go1_7_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. +// +build go1.7 + package ina219 import ( diff --git a/experimental/devices/nrzled/nrzled_go1_8_test.go b/experimental/devices/nrzled/nrzled_go1_7_test.go similarity index 97% rename from experimental/devices/nrzled/nrzled_go1_8_test.go rename to experimental/devices/nrzled/nrzled_go1_7_test.go index 93f3cc5..c5108f3 100644 --- a/experimental/devices/nrzled/nrzled_go1_8_test.go +++ b/experimental/devices/nrzled/nrzled_go1_7_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. -// +build go1.8 +// +build go1.7 package nrzled