reformat code and job array
This commit is contained in:
parent
a665ccd4fe
commit
9ff857db9f
64 changed files with 1497 additions and 2476 deletions
39
src/lib/testsuite/test_config.c
Normal file
39
src/lib/testsuite/test_config.c
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unity/unity.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
static void test_cluster_id(void)
|
||||
{
|
||||
TEST_ASSERT_TRUE(MAX_CLUSTER_ID == 63);
|
||||
TEST_ASSERT_TRUE(CLUSTER_ID_SHIFT == 58);
|
||||
}
|
||||
|
||||
static void test_apiserver_id(void)
|
||||
{
|
||||
TEST_ASSERT_TRUE(MAX_APISERVER_ID == 15);
|
||||
TEST_ASSERT_TRUE(APISERVER_ID_SHIFT == 54);
|
||||
}
|
||||
|
||||
static void test_timestamp(void) { TEST_ASSERT_TRUE(TIMESTAMP_SHIFT == 22); }
|
||||
|
||||
static void test_tag(void) { TEST_ASSERT_TRUE(TAG_SHIFT == 20); }
|
||||
|
||||
static void test_array(void)
|
||||
{
|
||||
TEST_ASSERT_TRUE(SEQUENCE_HIGH_SHIFT == 15);
|
||||
TEST_ASSERT_TRUE(MAX_ARRAY_IDX == 32767);
|
||||
}
|
||||
|
||||
void test_config(void)
|
||||
{
|
||||
printf("\n>> config test\n\n");
|
||||
|
||||
RUN_TEST(test_cluster_id);
|
||||
RUN_TEST(test_apiserver_id);
|
||||
RUN_TEST(test_timestamp);
|
||||
RUN_TEST(test_tag);
|
||||
RUN_TEST(test_array);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue