litespeed-quic/test/unittests/test_alt_svc_ver.c
Dmitri Tikhonov 7d09751dbb Release 2.8.7
- [BUGFIX] Initial packet size check for IETF mini conn applies to
  UDP payload, not QUIC packet.
- Support old and new school loss_bits transport parameter.
- Use Q run length of 64 as suggested in the loss bits Draft.
- Undo square wave count when packet is delayed.
- Code cleanup; minor fixes.
2020-01-09 11:52:25 -05:00

17 lines
569 B
C

/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
#include <assert.h>
#include <string.h>
#include "lsquic.h"
#define B(x) (1<<(x))
int
main (void)
{
assert(0 == strcmp("", lsquic_get_alt_svc_versions(0xF000))); /* Invalid bits ignored and no crash */
assert(0 == strcmp("39", lsquic_get_alt_svc_versions(B(LSQVER_039))));
assert(0 == strcmp("39,43", lsquic_get_alt_svc_versions(B(LSQVER_039)|B(LSQVER_043))));
assert(0 == strcmp("39,43", lsquic_get_alt_svc_versions(0xFF0000|B(LSQVER_039)|B(LSQVER_043))));
return 0;
}