test: align Ethernet settings bounds with shared radio range

This commit is contained in:
mikecarper committed 2026-10-19 22:22:10 -07:00
1 parent dec9b2ae08
commit eb89aa5fc3
1 file changed
+8 -1
+8 -1
View File
@@ -76,7 +76,14 @@ int main() {
assert(!validSettings(value));
encodeSettings(bytes,value); assert(!decodeSettings(bytes,sizeof(bytes),loaded));
value=configured();
for(float bad : {0.f,149.f,2501.f,std::numeric_limits<float>::infinity(),
// The portable image accepts the shared radio range. The live wrapper
// separately enforces chip-specific bands before applying a tuple.
for(float good : {137.f,149.f,2500.f}) {
value.radio.freq=good; assert(validSettings(value));
encodeSettings(bytes,value); assert(decodeSettings(bytes,sizeof(bytes),loaded));
assert(loaded.radio==value.radio);
}
for(float bad : {0.f,136.999f,2500.001f,std::numeric_limits<float>::infinity(),
std::numeric_limits<float>::quiet_NaN()}) {
value.radio.freq=bad; assert(!validSettings(value));
encodeSettings(bytes,value); assert(!decodeSettings(bytes,sizeof(bytes),loaded));