summaryrefslogtreecommitdiff
path: root/cesar/bsu/aclf/test
diff options
context:
space:
mode:
authorNélio Laranjeiro2011-04-20 15:06:22 +0200
committerNélio Laranjeiro2011-05-09 10:03:45 +0200
commit53833228e7907aa13f3c1786a8e6756f9d6e855a (patch)
tree8fc1b834ead0b3f5338467a2ee12ee4c73ce9a8d /cesar/bsu/aclf/test
parent0ad83d3d98c1d01c80d3de7918f07d784c09a8b2 (diff)
cesar/bsu/aclf: store frequency detection kind, refs #2463
Diffstat (limited to 'cesar/bsu/aclf/test')
-rw-r--r--cesar/bsu/aclf/test/utest/src/freq.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cesar/bsu/aclf/test/utest/src/freq.c b/cesar/bsu/aclf/test/utest/src/freq.c
index 8d79a3b6c2..8e23fa529a 100644
--- a/cesar/bsu/aclf/test/utest/src/freq.c
+++ b/cesar/bsu/aclf/test/utest/src/freq.c
@@ -50,7 +50,13 @@ test_aclf_verify_beacon_period (
{
int diff_tck = bp_freq_tck - bp;
test_fail_unless (diff_tck >= -25 && diff_tck <= 25);
+ test_fail_unless ((frequency >= 550
+ && ctx->aclf->frequency == BSU_ACLF_FREQ_60HZ)
+ || (frequency < 550
+ && ctx->aclf->frequency == BSU_ACLF_FREQ_50HZ));
}
+ else
+ test_fail_unless (ctx->aclf->frequency == BSU_ACLF_FREQ_UNKNOWN);
}
/**
@@ -140,15 +146,15 @@ test_case_aclf_all_frequencies (test_t t)
uint f;
float frequency;
bsu_aclf_test_t ctx;
- bsu_aclf_test_init (&ctx);
for (f = 425; f < 691; f++)
{
+ bsu_aclf_test_init (&ctx);
frequency = (float) f / 10;
ctx.phy->frequency_hz = frequency;
bsu_aclf_acl_frequency_detection (ctx.aclf);
test_aclf_verify_beacon_period (t, &ctx, f);
+ bsu_aclf_test_uninit (&ctx);
}
- bsu_aclf_test_uninit (&ctx);
}
test_end;
test_case_begin (t, "Increase, decrease");