diff --git a/tests/threshold_sms_test.php b/tests/threshold_sms_test.php index d597afd..99b435d 100644 --- a/tests/threshold_sms_test.php +++ b/tests/threshold_sms_test.php @@ -104,8 +104,11 @@ check($m !== null && abs($m - 10.7) < 0.6, 'condensation margin 20C/50% ~= 10.7C // 습도 0%/결측은 산출 불가 → null, 위험 없음 check(dew_point_c(20.0, 0.0) === null, 'dew point undefined at 0% RH'); check(condensation_margin_c(null, 50.0) === null, 'margin null when temp missing'); -// 고온고습(margin 좁음)은 결로 위험으로 미해소 -check(condensation_is_clear(18.0, 92.0) === false, '18C/92% has tight margin -> not clear'); +// 고온고습(margin 좁음)은 결로 위험으로 미해소 — 결로경보 활성(MARGIN>0)일 때만 의미가 있다. +// (비활성이면 condensation_is_clear 는 항상 true 로 단락 → 아래 여유값 해소 단언과 일관) +if (METRIC_DEWPOINT_MARGIN_C > 0) { + check(condensation_is_clear(18.0, 92.0) === false, '18C/92% has tight margin -> not clear'); +} // 여유 있는 값은 해소 check(condensation_is_clear(20.0, 50.0) === true, '20C/50% margin wide -> clear'); // 결측은 정상(해소)로 간주