Slide 13
Slide 13 text
ςʔϒϧۦಈςετ
w Α͘ΘΕΔύλʔϯςʔϒϧۦಈ UBCMFESJWFO
ςετ˞
w ೖྗɾظͷΈ߹ΘͤΛෳ༻ҙͯ͠ϧʔϓͰճ͢ελΠϧ
˞ڭՊॻͰ
ʮදۦಈʯͱ
༁͞Ε͍ͯΔ
func TestTHI(t *testing.T)
{
var tests = []struct
{
temperature float6
4
humidity float6
4
expected float6
4
}
{
{25.2, 65.0, 73.58}
,
{-33.0, 100.0, -27.4}
,
{40, 0.0, 78.4}
,
}
for i, test := range tests
{
actual := THI(test.temperature, test.humidity
)
if test.expected != actual
{
t.Errorf("#%d: THI(%v, %v) = %v (ظ: %v)", i+1
,
test.temperature, test.humidity, actual, test.expected
)
}
}
}
ςʔϒϧͷ֤ߦͷఆٛ
lςʔϒϧz
ϧʔϓͰ֤ߦΛճ͢