File tree Expand file tree Collapse file tree 3 files changed +29
-19
lines changed
Expand file tree Collapse file tree 3 files changed +29
-19
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ add_executable(
2323 llvmcodebuilder_test.cpp
2424 llvminstructionlist_test.cpp
2525 code_analyzer/variable_type_analysis.cpp
26+ code_analyzer/mixed_type_analysis.cpp
2627 operators/equal_comparison_test.cpp
2728 operators/greater_than_test.cpp
2829 operators/less_than_test.cpp
Original file line number Diff line number Diff line change 1+ #include < scratchcpp/variable.h>
2+ #include < scratchcpp/list.h>
3+ #include < engine/internal/llvm/llvmcodeanalyzer.h>
4+ #include < engine/internal/llvm/llvminstruction.h>
5+ #include < engine/internal/llvm/llvminstructionlist.h>
6+ #include < engine/internal/llvm/llvmconstantregister.h>
7+ #include < gtest/gtest.h>
8+
9+ using namespace libscratchcpp ;
10+
11+ TEST (LLVMCodeAnalyzer_MixedTypeAnalysis, EmptyScript)
12+ {
13+ LLVMCodeAnalyzer analyzer;
14+ LLVMInstructionList list;
15+
16+ analyzer.analyzeScript (list);
17+ }
18+
19+ TEST (LLVMCodeAnalyzer_MixedTypeAnalysis, NoOperations)
20+ {
21+ LLVMCodeAnalyzer analyzer;
22+ LLVMInstructionList list;
23+
24+ auto funcCall = std::make_shared<LLVMInstruction>(LLVMInstruction::Type::FunctionCall, false );
25+ list.addInstruction (funcCall);
26+
27+ analyzer.analyzeScript (list);
28+ }
Original file line number Diff line number Diff line change 77
88using namespace libscratchcpp ;
99
10- TEST (LLVMCodeAnalyzer_VariableTypeAnalysis, EmptyScript)
11- {
12- LLVMCodeAnalyzer analyzer;
13- LLVMInstructionList list;
14-
15- analyzer.analyzeScript (list);
16- }
17-
18- TEST (LLVMCodeAnalyzer_VariableTypeAnalysis, NoVariableOperations)
19- {
20- LLVMCodeAnalyzer analyzer;
21- LLVMInstructionList list;
22-
23- auto funcCall = std::make_shared<LLVMInstruction>(LLVMInstruction::Type::FunctionCall, false );
24- list.addInstruction (funcCall);
25-
26- analyzer.analyzeScript (list);
27- }
28-
2910TEST (LLVMCodeAnalyzer_VariableTypeAnalysis, FirstVariableWrite)
3011{
3112 LLVMCodeAnalyzer analyzer;
You can’t perform that action at this time.
0 commit comments