PER Firmware
Loading...
Searching...
No Matches
test_compile_time Namespace Reference

Functions

 compile_case (compiler, include_dir, filename)
 
 compile_environment ()
 
 test_compile (compile_environment, filename, should_compile)
 

Variables

 TEST_DIR = Path(__file__).resolve().parent
 
 FIRMWARE_DIR = TEST_DIR.parents[2]
 
str CASES_DIR = TEST_DIR / "compile_time"
 
list CASES
 

Detailed Description

dearunits/test_compile_time.py

Check that the C23 compiler properly rejects/accepts DearUnits during build

Author: Irving Wang (irvingw@purdue.edu)

Function Documentation

◆ compile_case()

test_compile_time.compile_case ( compiler,
include_dir,
filename )
Here is the caller graph for this function:

◆ compile_environment()

test_compile_time.compile_environment ( )
Here is the call graph for this function:

◆ test_compile()

test_compile_time.test_compile ( compile_environment,
filename,
should_compile )
Here is the call graph for this function:

Variable Documentation

◆ CASES

list test_compile_time.CASES
Initial value:
1= [
2 ("valid_operations.c", True),
3 ("reject_incompatible_addition.c", False),
4 ("reject_unsupported_product.c", False),
5 ("reject_non_base_product.c", False),
6 ("reject_wrong_conversion.c", False),
7 ("reject_wrong_result_type.c", False),
8 ("reject_incompatible_comparison.c", False),
9]

◆ CASES_DIR

str test_compile_time.CASES_DIR = TEST_DIR / "compile_time"

◆ FIRMWARE_DIR

test_compile_time.FIRMWARE_DIR = TEST_DIR.parents[2]

◆ TEST_DIR

test_compile_time.TEST_DIR = Path(__file__).resolve().parent