Basic testing infrastructure

This commit is contained in:
2024-04-09 23:00:08 +02:00
parent 4ad19ff450
commit 39f0a0bc0d
45 changed files with 529 additions and 114 deletions

View File

@@ -6,48 +6,105 @@
<fileSet type="globPattern" pattern="stl/*" />
</list>
</option>
<Objective-C-extensions>
<rules>
<rule entity="NAMESPACE" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
<rule entity="MACRO" visibility="ANY" specifier="ANY" prefix="" style="SCREAMING_SNAKE_CASE" suffix="" />
<rule entity="CLASS" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
<rule entity="STRUCT" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
<rule entity="ENUM" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
<rule entity="ENUMERATOR" visibility="ANY" specifier="ANY" prefix="" style="SCREAMING_SNAKE_CASE" suffix="" />
<rule entity="TYPEDEF" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="UNION" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="CLASS_MEMBER_FUNCTION" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="STRUCT_MEMBER_FUNCTION" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="GLOBAL_FUNCTION" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="GLOBAL_VARIABLE" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="PARAMETER" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="LOCAL_VARIABLE" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="CLASS_MEMBER_FIELD,STRUCT_MEMBER_FIELD" visibility="PUBLIC" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="CLASS_MEMBER_FIELD,STRUCT_MEMBER_FIELD" visibility="PROTECTED,PRIVATE" specifier="ANY" prefix="_" style="SNAKE_CASE" suffix="" />
<rule entity="GLOBAL_VARIABLE" visibility="ANY" specifier="CONST" prefix="k" style="PASCAL_CASE" suffix="" />
</rules>
</Objective-C-extensions>
<Objective-C-extensions>
<rules>
<rule entity="NAMESPACE" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
<rule entity="MACRO" visibility="ANY" specifier="ANY" prefix="" style="SCREAMING_SNAKE_CASE" suffix="" />
<rule entity="CLASS" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
<rule entity="STRUCT" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
<rule entity="ENUM" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
<rule entity="ENUMERATOR" visibility="ANY" specifier="ANY" prefix="" style="SCREAMING_SNAKE_CASE" suffix="" />
<rule entity="TYPEDEF" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="UNION" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="CLASS_MEMBER_FUNCTION" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="STRUCT_MEMBER_FUNCTION" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="GLOBAL_FUNCTION" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="GLOBAL_VARIABLE" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="PARAMETER" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="LOCAL_VARIABLE" visibility="ANY" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="CLASS_MEMBER_FIELD,STRUCT_MEMBER_FIELD" visibility="PUBLIC" specifier="ANY" prefix="" style="SNAKE_CASE" suffix="" />
<rule entity="CLASS_MEMBER_FIELD,STRUCT_MEMBER_FIELD" visibility="PROTECTED,PRIVATE" specifier="ANY" prefix="_" style="SNAKE_CASE" suffix="" />
<rule entity="GLOBAL_VARIABLE" visibility="ANY" specifier="CONST" prefix="k" style="PASCAL_CASE" suffix="" />
</rules>
</Objective-C-extensions>
<RiderCodeStyleSettings>
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
</RiderCodeStyleSettings>
<clangFormatSettings>
<option name="ENABLED" value="true" />
</clangFormatSettings>

103
.idea/editor.xml generated Normal file
View File

@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BackendCodeEditorSettings">
<option name="/Default/Housekeeping/GlobalSettingsUpgraded/IsUpgraded/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
</component>
</project>

View File

@@ -5,4 +5,8 @@ project(ficus C CXX ASM_NASM)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 11)
if (TEST_MODE)
enable_testing()
endif ()
add_subdirectory(./src/)

View File

@@ -14,7 +14,7 @@ cd newlib
# rm -rf build
mkdir -p build
cd build
../newlib-4.4.0.20231231/configure --enable-newlib-supplied-syscalls --prefix=/usr --target=$TARGET
#../newlib-4.4.0.20231231/configure --enable-newlib-supplied-syscalls --prefix=/usr --target=$TARGET
make -j$(nproc) all
make DESTDIR="$FICUS_ROOT/sysroot" install
cp -r "$FICUS_ROOT/sysroot/usr"/x86_64-ficus/* "$FICUS_ROOT/sysroot/usr"

View File

@@ -4143,8 +4143,51 @@
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="a1d64c97-d3a9-4bfe-95e2-d4c818bb425b" name="Changes" comment="we're not using libgloss anyway, disable it">
<list default="true" id="a1d64c97-d3a9-4bfe-95e2-d4c818bb425b" name="Changes" comment="more proper newlib setup">
<change afterPath="$PROJECT_DIR$/../../../.idea/editor.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../../../src/unit-tests/CMakeLists.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../../../src/unit-tests/templates/CMakeLists.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../../../src/unit-tests/templates/SkipListTest.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../.idea/codeStyles/Project.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../../.idea/codeStyles/Project.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../build-newlib.sh" beforeDir="false" afterPath="$PROJECT_DIR$/../../build-newlib.sh" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/CMakeLists.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/boot.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/boot.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/gdt.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/gdt.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/idt.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/idt.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/kmain.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/kmain.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/kmem.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/kmem.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/limine_modules.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/limine_modules.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/memman.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/memman.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/misc.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/misc.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/misc.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/misc.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/paging.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/paging.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/serial.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/serial.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/serial.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/serial.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/syscalls.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/syscalls.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/arch/x86/task.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/arch/x86/task.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/iso/limine.cfg" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/iso/limine.cfg" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/CMakeLists.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/LockGuard.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/LockGuard.hpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/Spinlock.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/Spinlock.hpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/VMA.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/VMA.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/asserts.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/asserts.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/asserts.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/assert.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/cppsupport.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/cppsupport.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/mutex.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/mutex.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/templates/CMakeLists.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/CircularBuffer.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/templates/CircularBuffer.hpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/List.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/templates/List.hpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/PointersCollection.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/templates/PointersCollection.hpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/SkipList.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/templates/SkipList.hpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/String.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/templates/String.hpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/TestTemplates.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/TestTemplates.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/TestTemplates.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/TestTemplates.hpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/Vector.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/templates/Vector.hpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/stl/stl_alloc.h" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/templates/stl/stl_alloc.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/kernel/templates/stl/stl_config.h" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/kernel/templates/stl/stl_config.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/test/init.c" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/test/init.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../src/uapi/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/../../../src/uapi/CMakeLists.txt" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -4162,6 +4205,54 @@
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://$PROJECT_DIR$/newlib/libc/Makefile.inc" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/include/_syslist.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/include/dirent.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/include/reent.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/include/stdio.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/include/sys/_default_fcntl.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/include/sys/cdefs.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/execl.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/execle.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/execlp.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/execv.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/execve.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/execvp.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/opendir.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/popen.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/posix_spawn.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/readdir.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/readdir_r.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/posix/sleep.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/reent/Makefile.inc" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/reent/closer.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/reent/linkr.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/reent/readr.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/stdio/getc_u.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/stdio/getdelim.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/stdlib/environ.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/stdlib/getenv_r.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/sys/arm/Makefile.inc" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/sys/arm/access.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/sys/arm/sys/fcntl.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/sys/ficus/crt0.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/sys/ficus/sys/dirent.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/sys/ficus/syscalls.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/sys/rtems/crt0.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/sys/rtems/include/sys/dirent.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/unix/getcwd.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/newlib/libc/unix/getlogin.c" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../../sysroot/usr/include/dirent.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../../sysroot/usr/include/sys/_default_fcntl.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../../sysroot/usr/include/sys/cdefs.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../../sysroot/usr/include/sys/dirent.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../../sysroot/usr/include/sys/features.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../../sysroot/usr/include/sys/lock.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../../sysroot/usr/include/sys/syslimits.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../../sysroot/usr/include/sys/unistd.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../../sysroot/usr/include/unistd.h" root0="FORCE_HIGHLIGHTING" />
</component>
<component name="MakefileLocalSettings">
<option name="toolchainName" value="Ficus" />
<option name="availableProjects">
@@ -4206,6 +4297,7 @@
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.RadMigrateCodeStyle&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;RunOnceActivity.readMode.enableVisualFormatting&quot;: &quot;true&quot;,
@@ -4223,6 +4315,12 @@
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/newlib/libc/sys/ficus" />
<recent name="$PROJECT_DIR$/newlib/libc/sys/ficus/include" />
</key>
</component>
<component name="RunManager" selected="Native Application.all">
<configuration name="TAGS-bfd" type="CLionNativeAppRunConfigurationType" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="newlib-4.4.0.20231231" TARGET_NAME="TAGS-bfd" CONFIG_NAME="TAGS-bfd" version="1">
<method v="2">
@@ -29023,6 +29121,18 @@
<workItem from="1711915508976" duration="623000" />
<workItem from="1711920939451" duration="9000" />
<workItem from="1711920963007" duration="2000" />
<workItem from="1712315024911" duration="1731000" />
<workItem from="1712344519577" duration="399000" />
<workItem from="1712346585216" duration="1000" />
<workItem from="1712350566636" duration="871000" />
<workItem from="1712388119459" duration="2026000" />
<workItem from="1712411591824" duration="598000" />
<workItem from="1712426676821" duration="609000" />
<workItem from="1712431079475" duration="5000" />
<workItem from="1712515591568" duration="5087000" />
<workItem from="1712521110659" duration="2760000" />
<workItem from="1712689327895" duration="128000" />
<workItem from="1712691199435" duration="1903000" />
</task>
<task id="LOCAL-00001" summary="we're not using libgloss anyway, disable it">
<option name="closed" value="true" />
@@ -29032,7 +29142,15 @@
<option name="project" value="LOCAL" />
<updated>1711798946101</updated>
</task>
<option name="localTasksCounter" value="2" />
<task id="LOCAL-00002" summary="more proper newlib setup">
<option name="closed" value="true" />
<created>1712520216357</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1712520216357</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -29040,6 +29158,18 @@
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="we're not using libgloss anyway, disable it" />
<option name="LAST_COMMIT_MESSAGE" value="we're not using libgloss anyway, disable it" />
<MESSAGE value="more proper newlib setup" />
<option name="LAST_COMMIT_MESSAGE" value="more proper newlib setup" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
<url>file://$PROJECT_DIR$/newlib/libc/sys/ficus/syscalls.c</url>
<line>54</line>
<option name="timeStamp" value="2" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
</project>

View File

@@ -34,6 +34,14 @@ add_subdirectory(./arch/)
add_subdirectory(./kernel/)
add_subdirectory(./uapi/)
add_subdirectory(./test/)
add_subdirectory(./iso/)
if (TEST_MODE)
set_target_properties(kernel.elf PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
set_target_properties(syscalls_interface PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
add_subdirectory(./unit-tests/)
endif ()
if (NOT TEST_MODE)
add_subdirectory(./test/)
add_subdirectory(./iso/)
endif ()

View File

@@ -2,7 +2,7 @@
#include <cstdint>
#include <new>
#include "asserts.hpp"
#include "assert.h"
#include "gdt.hpp"
#include "globals.hpp"
#include "idt.hpp"
@@ -12,7 +12,7 @@
#include "limine_mm.hpp"
#include "limine_modules.hpp"
#include "memman.hpp"
#include "misc.hpp"
#include "misc.h"
#include "paging.hpp"
AddressSpace *BOOT_AddressSpace;

View File

@@ -3,8 +3,8 @@
//
#include "gdt.hpp"
#include "asserts.hpp"
#include "misc.hpp"
#include "assert.h"
#include "misc.h"
#include <cstddef>
namespace Arch::GDT {
static tss_entry_struct tss_entry;

View File

@@ -1,9 +1,9 @@
#include "idt.hpp"
#include "asserts.hpp"
#include "assert.h"
#include "gdt.hpp"
#include "io.hpp"
#include "misc.hpp"
#include "misc.h"
#include "task.hpp"
#include "task_arch.hpp"
#include "timer.hpp"

View File

@@ -17,13 +17,13 @@
#include "VFSGlobals.hpp"
#include "VFSTester.hpp"
#include "VMA.hpp"
#include "asserts.hpp"
#include "assert.h"
#include "globals.hpp"
#include "kmem.hpp"
#include "limine_fb.hpp"
#include "limine_modules.hpp"
#include "memman.hpp"
#include "misc.hpp"
#include "misc.h"
#include "mutex.hpp"
#include "rand.h"
#include "syscalls.hpp"

View File

@@ -2,7 +2,7 @@
#include "LockGuard.hpp"
#include "Spinlock.hpp"
#include "asserts.hpp"
#include "assert.h"
#include "globals.hpp"
#include "memman.hpp"
#include "paging.hpp"

View File

@@ -4,7 +4,7 @@
#include "limine_modules.hpp"
#include "asserts.hpp"
#include "assert.h"
#include "globals.hpp"
#include "paging.hpp"
#include "string.h"

View File

@@ -5,8 +5,8 @@
#include "memman.hpp"
#include "LockGuard.hpp"
#include "Spinlock.hpp"
#include "asserts.hpp"
#include "misc.hpp"
#include "assert.h"
#include "misc.h"
#include "mutex.hpp"
#include "paging.hpp"
#include <stddef.h>

View File

@@ -1,8 +1,8 @@
//
// Created by Stepan Usatiuk on 13.08.2023.
//
extern "C" void _hcf() {
extern "C" {
void _hcf() {
// *(volatile char *) (0) = 42;
while (1)
asm volatile("cli; hlt");
@@ -39,4 +39,5 @@ char *itoa(int value, char *str, int base) {
*ptr-- = tmp;
}
return rc;
}
}

View File

@@ -2,9 +2,11 @@
#define FICUS_MISC_H
#include <stdint.h>
extern "C" void _sse_setup();
extern "C" void _hcf();
#ifdef __cplusplus
extern "C" {
#endif
void _sse_setup();
void _hcf();
#define barrier() __asm__ __volatile__("" :: \
: "memory");
@@ -89,5 +91,8 @@ static inline uint64_t rdmsr(uint64_t msr) {
}
char *itoa(int value, char *str, int base);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -4,10 +4,10 @@
#include "paging.hpp"
#include "LockGuard.hpp"
#include "asserts.hpp"
#include "assert.h"
#include "limine.h"
#include "memman.hpp"
#include "misc.hpp"
#include "misc.h"
#include "FDT.hpp"

View File

@@ -2,13 +2,13 @@
// Created by Stepan Usatiuk on 12.08.2023.
//
#include "asserts.hpp"
#include "assert.h"
#include <stdint.h>
#include "io.hpp"
#include "task.hpp"
extern "C" {
#define PORT 0x3f8 // COM1
int init_serial() {
@@ -71,3 +71,4 @@ void writestr(const char *a) {
void writestr_no_yield(const char *a) {
while (*a != '\0') write_serial_no_yield(*a++);
}
}

View File

@@ -5,8 +5,10 @@
#ifndef FICUS_SERIAL_H
#define FICUS_SERIAL_H
#include "misc.hpp"
#include "misc.h"
#ifdef __cplusplus
extern "C" {
#endif
int init_serial();
int serial_received();
@@ -17,5 +19,7 @@ void write_serial(char a);
void writestr(const char *a);
void write_serial_no_yield(char a);
void writestr_no_yield(const char *a);
#ifdef __cplusplus
}
#endif
#endif //FICUS_SERIAL_H

View File

@@ -11,9 +11,9 @@
#include <cstdint>
#include "TtyManager.hpp"
#include "asserts.hpp"
#include "assert.h"
#include "gdt.hpp"
#include "misc.hpp"
#include "misc.h"
#include "BytesFormatter.hpp"
#include "ElfParser.hpp"

View File

@@ -8,12 +8,12 @@
#include "Spinlock.hpp"
#include "TtyManager.hpp"
#include "VMA.hpp"
#include "asserts.hpp"
#include "assert.h"
#include "cv.hpp"
#include "gdt.hpp"
#include "globals.hpp"
#include "kmem.hpp"
#include "misc.hpp"
#include "misc.h"
#include "mutex.hpp"
#include "paging.hpp"
#include "string.h"

View File

@@ -11,6 +11,7 @@ TIMEOUT=1
MODULE_PATH=boot:///init
MODULE_PATH=boot:///hello2
MODULE_PATH=boot:///psil
# Same thing, but without KASLR.
:ficus (KASLR off)
@@ -22,3 +23,4 @@ TIMEOUT=1
KERNEL_PATH=boot:///ficus.elf
MODULE_PATH=boot:///init
MODULE_PATH=boot:///hello2
MODULE_PATH=boot:///psil

View File

@@ -13,6 +13,7 @@ target_sources(kernel.elf PRIVATE
cv.cpp
BytesFormatter.cpp
string.c
TestTemplates.cpp
)
add_subdirectory(templates)

View File

@@ -5,7 +5,7 @@
#ifndef FICUS_LOCKGUARD_H
#define FICUS_LOCKGUARD_H
#include "asserts.hpp"
#include "assert.h"
template<typename T>
class LockGuard {

View File

@@ -5,7 +5,7 @@
#ifndef FICUS_SPINLOCK_H
#define FICUS_SPINLOCK_H
#include "asserts.hpp"
#include "assert.h"
#include "task.hpp"
#include <atomic>
#include <cstdint>

View File

@@ -5,13 +5,13 @@
#include "TestTemplates.hpp"
#include "assert.h"
#include "List.hpp"
#include "PointersCollection.hpp"
#include "SkipList.hpp"
#include "SkipListSet.hpp"
#include "String.hpp"
#include "Vector.hpp"
#include "asserts.hpp"
#include "TtyManager.hpp"

View File

@@ -7,7 +7,7 @@
#include <optional>
#include "LockGuard.hpp"
#include "asserts.hpp"
#include "assert.h"
#include "kmem.hpp"
#include "memman.hpp"
#include "paging.hpp"

View File

@@ -5,8 +5,8 @@
#ifndef FICUS_ASSERTS_HPP
#define FICUS_ASSERTS_HPP
#include "misc.hpp"
#include "serial.hpp"
#include "misc.h"
#include "serial.h"
extern "C" {
static inline void _assert2(int val, const char *msg) {

View File

@@ -2,4 +2,4 @@
// Created by Stepan Usatiuk on 26.10.2023.
//
#include "asserts.hpp"
#include "assert.h"

View File

@@ -5,9 +5,9 @@
#include <cstddef>
#include <cstdint>
#include "asserts.hpp"
#include "assert.h"
#include "kmem.hpp"
#include "misc.hpp"
#include "misc.h"
#if UINT32_MAX == UINTPTR_MAX
#define STACK_CHK_GUARD 0xb079a218

View File

@@ -4,7 +4,7 @@
#include "mutex.hpp"
#include "LockGuard.hpp"
#include "asserts.hpp"
#include "assert.h"
#include "task.hpp"
#include "timer.hpp"

View File

@@ -1,5 +1,9 @@
target_include_directories(kernel.elf PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(kernel.elf PRIVATE TestTemplates.cpp)
add_library(templates
INTERFACE
)
target_include_directories(templates INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(kernel.elf PRIVATE templates)
add_subdirectory(stl)

View File

@@ -5,7 +5,7 @@
#ifndef FICUS_CIRCULARBUFFER_HPP
#define FICUS_CIRCULARBUFFER_HPP
#include "asserts.hpp"
#include "assert.h"
// FIXME
template<typename T, auto S>

View File

@@ -9,7 +9,7 @@
#include <cstdint>
#include <utility>
#include "asserts.hpp"
#include "assert.h"
template<typename T>
class List {

View File

@@ -5,8 +5,7 @@
#include <optional>
#include <utility>
#include "asserts.hpp"
#include "kmem.hpp"
#include "assert.h"
class SharedPtrTester;

View File

@@ -6,8 +6,9 @@
#include <type_traits>
#include <utility>
#include "asserts.hpp"
#include "rand.h"
#include "assert.h"
extern "C" int rand(void);
template<typename K, typename V>
class SkipList {

View File

@@ -4,14 +4,14 @@
#include <cstdlib>
#include <utility>
#include "asserts.hpp"
#include "kmem.hpp"
#include "assert.h"
#include "stdlib.h"
#include "string.h"
class String {
public:
String() noexcept {
_data = static_cast<char *>(kmalloc(1 * sizeof(char)));
_data = static_cast<char *>(malloc(1 * sizeof(char)));
curLen = 0;
_data[0] = '\0';
}
@@ -19,7 +19,7 @@ public:
String(const char *in) noexcept {
curLen = strlen(in);
_data = static_cast<char *>(kmalloc((curLen + 1) * sizeof(char)));
_data = static_cast<char *>(malloc((curLen + 1) * sizeof(char)));
_data[0] = '\0';
strcat(_data, in);
@@ -28,7 +28,7 @@ public:
String(String const &str) noexcept {
curLen = str.curLen;
_data = static_cast<char *>(kmalloc((curLen + 1) * sizeof(char)));
_data = static_cast<char *>(malloc((curLen + 1) * sizeof(char)));
_data[0] = '\0';
strcat(_data, str._data);
@@ -38,7 +38,7 @@ public:
_data = str._data;
curLen = str.curLen;
str._data = static_cast<char *>(kmalloc(1 * sizeof(char)));
str._data = static_cast<char *>(malloc(1 * sizeof(char)));
str.curLen = 0;
str._data[0] = '\0';
}
@@ -51,13 +51,13 @@ public:
~String() noexcept {
if (_data == nullptr) return;
kfree(_data);
free(_data);
_data = nullptr;
curLen = 0;
}
String &operator+=(String const &rhs) {
_data = static_cast<char *>(krealloc(_data, sizeof(char) * (curLen + rhs.curLen + 1)));
_data = static_cast<char *>(realloc(_data, sizeof(char) * (curLen + rhs.curLen + 1)));
assert(_data != nullptr);
strcat(_data, rhs._data);
@@ -84,7 +84,7 @@ public:
}
String &operator+=(char c) {
_data = static_cast<char *>(krealloc(_data, sizeof(char) * (curLen + 2)));
_data = static_cast<char *>(realloc(_data, sizeof(char) * (curLen + 2)));
assert(_data != nullptr);
_data[curLen] = c;

View File

@@ -3,8 +3,7 @@
#include <new>
#include "asserts.hpp"
#include "kmem.hpp"
#include "assert.h"
#include "string.h"
class VectorTester;
@@ -15,14 +14,14 @@ class Vector {
public:
Vector() noexcept {
data = static_cast<T *>(kmalloc(capacity * sizeof(T)));
data = static_cast<T *>(malloc(capacity * sizeof(T)));
}
Vector(std::initializer_list<T> l) noexcept {
curSize = l.size();
capacity = curSize > 0 ? curSize : 2;
data = static_cast<T *>(kmalloc(capacity * sizeof(T)));
data = static_cast<T *>(malloc(capacity * sizeof(T)));
size_t i = 0;
for (auto const &el: l) {
@@ -34,7 +33,7 @@ public:
curSize = vec.curSize;
capacity = curSize > 0 ? curSize : 2;
data = static_cast<T *>(kmalloc(capacity * sizeof(T)));
data = static_cast<T *>(malloc(capacity * sizeof(T)));
for (size_t i = 0; i < curSize; i++)
new (data + i) T(vec.data[i]);
@@ -67,14 +66,14 @@ public:
if (capacity == curSize) {
capacity *= 2;
//Ugly hack to get around g++ warnings
data = (T *) krealloc(reinterpret_cast<char *>(data), capacity * sizeof(T));
data = (T *) realloc(reinterpret_cast<char *>(data), capacity * sizeof(T));
assert(data != nullptr);
}
new (data + (curSize++)) T(std::forward<Args>(args)...);
}
void compact() {
data = (T *) krealloc(reinterpret_cast<char *>(data), curSize * sizeof(T));
data = (T *) realloc(reinterpret_cast<char *>(data), curSize * sizeof(T));
capacity = curSize;
}

View File

@@ -42,7 +42,7 @@
# if defined(__STL_NO_BAD_ALLOC) || !defined(__STL_USE_EXCEPTIONS)
//# include <stdio.h>
//# include <stdlib.h>
#include "asserts.hpp"
#include "assert.h"
# define __THROW_BAD_ALLOC assert2(false,"out of memory");
# else /* Standard conforming out-of-memory handling */
# include <new>
@@ -53,7 +53,7 @@
#include "stddef.h"
#include "stdlib.h"
#include "string.h"
#include "asserts.hpp"
#include "assert.h"
#ifndef __RESTRICT
# define __RESTRICT
#endif

View File

@@ -573,7 +573,7 @@
#define __STL_ASSERTIONS
#ifdef __STL_ASSERTIONS
# include <asserts.hpp>
# include <assert.h>
# define __stl_assert(expr) assert2(expr, "STL Assert fail") ;
// if (!(expr)) { fprintf(stderr, "%s:%d STL assertion failure: %s\n", \
// __FILE__, __LINE__, # expr); abort(); }

View File

@@ -7,6 +7,7 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/wait.h>
void ls() {
DIR *rfd = opendir("/");
@@ -44,6 +45,7 @@ int main() {
print_tasks();
} else {
execve(line, 0, 0);
sleep(10000);
}
}
}

View File

@@ -1,4 +1,4 @@
add_library(syscalls_interface syscalls_interface.c)
target_include_directories(syscalls_interface INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(kernel.elf syscalls_interface)
target_link_libraries(kernel.elf PRIVATE syscalls_interface)

View File

@@ -0,0 +1,13 @@
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
add_subdirectory(templates)

View File

@@ -0,0 +1,12 @@
add_executable(
SkipListTest
SkipListTest.cpp
)
target_link_libraries(
SkipListTest
templates
GTest::gtest_main
)
include(GoogleTest)
gtest_discover_tests(SkipListTest DISCOVERY_TIMEOUT 600)

View File

@@ -0,0 +1,69 @@
#include <gtest/gtest.h>
#include <SkipList.hpp>
// FIXME
char *itoa(int value, char *str, int base) {
char *rc;
char *ptr;
char *low;
// Check for supported base.
if (base < 2 || base > 36) {
*str = '\0';
return str;
}
rc = ptr = str;
// Set '-' for negative decimals.
if (value < 0 && base == 10) {
*ptr++ = '-';
}
// Remember where the numbers start.
low = ptr;
// The actual conversion.
do {
// Modulo is negative for negative value. This trick makes abs() unnecessary.
*ptr++ = "zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz"[35 + value % base];
value /= base;
} while (value);
// Terminating the string.
*ptr-- = '\0';
// Invert the numbers.
while (low < ptr) {
char tmp = *low;
*low++ = *ptr;
*ptr-- = tmp;
}
return rc;
}
#include <String.hpp>
#include <string>
using sl_test_list = testing::Types<String, std::string>;
template<class>
struct SkipListTestFixture : testing::Test {};
TYPED_TEST_SUITE(SkipListTestFixture, sl_test_list);
TYPED_TEST(SkipListTestFixture, PlaceAdd) {
SkipList<int, TypeParam> test1;
test1.add(5, "test5", false);
test1.add(999, "test999", false);
test1.add(5, "test5", false);
test1.add(1, "test1", false);
test1.add(999, "test999", false);
ASSERT_EQ(test1.find(5)->data, "test5");
ASSERT_EQ(test1.find(1)->data, "test1");
ASSERT_EQ(test1.find(999)->data, "test999");
test1.erase(1);
ASSERT_NE(test1.find(1)->data, "test1");
test1.add(87, "test87", false);
ASSERT_EQ(test1.find(87)->data, "test87");
auto p2 = test1.lower_bound_update(78);
ASSERT_EQ(p2->data, "test87");
test1.add(78, "test78", true);
ASSERT_EQ(test1.find(78)->data, "test78");
}