Agora  1.2.0
Agora project
test_scrambler.cc File Reference

Unit tests for WLAN scrmabler and descrambler. More...

#include <gtest/gtest.h>
#include <ctime>
#include <vector>
#include "scrambler.h"
#include "utils_ldpc.h"
Include dependency graph for test_scrambler.cc:

Functions

 TEST (WLAN_Scrambler, fixed_input_scramble_int8_t)
 Construct a new TEST object. More...
 
 TEST (WLAN_Scrambler, fixed_input_scramble_uint8_t)
 Construct a new TEST object. More...
 
 TEST (WLAN_Scrambler, random_input_scramble_descramble_inplace)
 Construct a new TEST object. More...
 
 TEST (WLAN_Scrambler, random_input_scramble_descramble)
 random_input_scramble_descramble More...
 
int main (int argc, char **argv)
 

Variables

static constexpr size_t kNumInputBytes = 125
 

Detailed Description

Unit tests for WLAN scrmabler and descrambler.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ TEST() [1/4]

TEST ( WLAN_Scrambler  ,
fixed_input_scramble_int8_t   
)

Construct a new TEST object.

The test data and the expected output are hardcoded in byte_buffer[] and expect[] as int8_t.

◆ TEST() [2/4]

TEST ( WLAN_Scrambler  ,
fixed_input_scramble_uint8_t   
)

Construct a new TEST object.

The test data and the expected output are hardcoded in byte_buffer[] and expect[] as uint8_t.

◆ TEST() [3/4]

TEST ( WLAN_Scrambler  ,
random_input_scramble_descramble   
)

random_input_scramble_descramble

The test data is generated inside the test as random integers of 1 byte.

The expected output is the same as the test data, which is scrambled and then descrambled.

◆ TEST() [4/4]

TEST ( WLAN_Scrambler  ,
random_input_scramble_descramble_inplace   
)

Construct a new TEST object.

The test data is generated inside the test as random integers of 1 byte.

The expected output is the same as the test data, which is scrambled and then descrambled.

Variable Documentation

◆ kNumInputBytes

constexpr size_t kNumInputBytes = 125
staticconstexpr