bf543a4470342834b91630f68388667e9f56cb2a
[o-du/phy.git] / fhi_lib / test / test_xran / unittests.cc
1 /******************************************************************************\r
2 *\r
3 *   Copyright (c) 2019 Intel.\r
4 *\r
5 *   Licensed under the Apache License, Version 2.0 (the "License");\r
6 *   you may not use this file except in compliance with the License.\r
7 *   You may obtain a copy of the License at\r
8 *\r
9 *       http://www.apache.org/licenses/LICENSE-2.0\r
10 *\r
11 *   Unless required by applicable law or agreed to in writing, software\r
12 *   distributed under the License is distributed on an "AS IS" BASIS,\r
13 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 *   See the License for the specific language governing permissions and\r
15 *   limitations under the License.\r
16 *\r
17 *******************************************************************************/\r
18 \r
19 #include <limits.h>\r
20 #include "xran_compression.h"\r
21 #include "gtest/gtest.h"\r
22 \r
23 #define MAX_IQ (273*12*2)// 273 RBs, 12 SC, 32bits IQ\r
24 \r
25 int8_t iCompressionOutput_AVX_A[MAX_IQ + MAX_IQ/24]; /* 273 RB 8 bits IQ + exponent */\r
26 int16_t iDeCompressionOutput_AVX_A[MAX_IQ]; /* 273 RB 16bits IQ */\r
27 int16_t iCompressionInput[MAX_IQ]; /* 273 RB 16bits IQ */\r
28 int16_t iLength = 273*12*2; // total 16bits IQ\r
29 \r
30 // Tests\r
31 /*\r
32 TEST(Compression, Zero) {\r
33   EXPECT_EQ(0, xran_bfp_comp_avx512_fun_a(iCompressionInput,iCompressionOutput_AVX_A, iLength));\r
34 }\r
35 \r
36 \r
37 \r
38 TEST(Decompression, Zero) {\r
39     iLength= 24+1;\r
40     EXPECT_EQ(0, xran_bfp_decomp_avx512_fun_a(iCompressionOutput_AVX_A,iDeCompressionOutput_AVX_A,iLength));\r
41 }*/\r
42 \r
43 \r