mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Rename test/unittests to tests/ and test/ to bin/
This commit is contained in:
parent
ecfd688117
commit
9a690580c9
92 changed files with 38 additions and 39 deletions
18
tests/test_alt_svc_ver.c
Normal file
18
tests/test_alt_svc_ver.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* 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("43", lsquic_get_alt_svc_versions(B(LSQVER_043))));
|
||||
assert(0 == strcmp("43,46", lsquic_get_alt_svc_versions(B(LSQVER_046)|B(LSQVER_043))));
|
||||
assert(0 == strcmp("43,46", lsquic_get_alt_svc_versions(0xFF0000|B(LSQVER_046)|B(LSQVER_043))));
|
||||
assert(0 == strcmp("46", lsquic_get_alt_svc_versions(B(LSQVER_046)|B(LSQVER_050))));
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue