Browse Source
Merge branch 'Ulrich' into 'main'
Merge branch 'Ulrich' into 'main'
Ulrich See merge request pmuw_projekt/pmuw_projekt_notebinder!44main
fdai8032
11 months ago
370 changed files with 3431 additions and 4341 deletions
-
7.idea/vcs.xml
-
0And
-
33CMakeLists.txt
-
0Shell
-
BINbuild/artifacts/release/project.out
-
276build/release/cache/input.yml
-
1build/release/dependencies/Hallo_Welt.d
-
1build/release/dependencies/add_student.d
-
1build/release/dependencies/add_subject.d
-
0build/release/dependencies/force_build
-
1build/release/dependencies/game100.d
-
1build/release/dependencies/get_character.d
-
3build/release/dependencies/main.d
-
3build/release/dependencies/minesweeper_start.d
-
1build/release/dependencies/modify_student.d
-
1build/release/dependencies/modify_subject.d
-
1build/release/dependencies/pong.d
-
1build/release/dependencies/show_statistics.d
-
2build/release/dependencies/snake_start.d
-
5build/release/dependencies/testRunnerGenerator.d
-
3build/release/dependencies/testRunnerGeneratorSmall.d
-
5build/release/dependencies/testRunnerGeneratorWithMocks.d
-
5build/release/dependencies/testsample_cmd.d
-
1build/release/dependencies/tictactoe.d
-
1build/release/dependencies/top.d
-
BINbuild/release/out/c/Hallo_Welt.o
-
BINbuild/release/out/c/add_student.o
-
BINbuild/release/out/c/add_subject.o
-
BINbuild/release/out/c/game100.o
-
BINbuild/release/out/c/get_character.o
-
BINbuild/release/out/c/main.o
-
BINbuild/release/out/c/minesweeper_start.o
-
BINbuild/release/out/c/modify_student.o
-
BINbuild/release/out/c/modify_subject.o
-
BINbuild/release/out/c/pong.o
-
BINbuild/release/out/c/show_statistics.o
-
BINbuild/release/out/c/snake_start.o
-
BINbuild/release/out/c/testRunnerGenerator.o
-
BINbuild/release/out/c/testRunnerGeneratorSmall.o
-
BINbuild/release/out/c/testRunnerGeneratorWithMocks.o
-
BINbuild/release/out/c/testsample_cmd.o
-
BINbuild/release/out/c/tictactoe.o
-
BINbuild/release/out/c/top.o
-
14build/test/cache/defines_dependency.yml
-
46build/test/cache/test_add.c
-
79build/test/cache/test_bomb_in_array.c
-
47build/test/cache/test_cbrt.c
-
49build/test/cache/test_ceil.c
-
143build/test/cache/test_checkCollision.c
-
69build/test/cache/test_checkGameEnd.c
-
73build/test/cache/test_clearScreen.c
-
102build/test/cache/test_collision.c
-
51build/test/cache/test_divide.c
-
35build/test/cache/test_exp.c
-
51build/test/cache/test_exp2.c
-
47build/test/cache/test_floor.c
-
35build/test/cache/test_fmax.c
-
49build/test/cache/test_fmin.c
-
269build/test/cache/test_is_Valid_tile.c
-
47build/test/cache/test_log.c
-
49build/test/cache/test_log10.c
-
47build/test/cache/test_mod.c
-
142build/test/cache/test_moving_snake.c
-
47build/test/cache/test_multiply.c
-
205build/test/cache/test_number_of_bombs.c
-
102build/test/cache/test_part_of_snake.c
-
83build/test/cache/test_playerInputMovement.c
-
51build/test/cache/test_pong.c
-
49build/test/cache/test_round.c
-
53build/test/cache/test_sin.c
-
47build/test/cache/test_sqrt.c
-
51build/test/cache/test_subtract.c
-
73build/test/cache/test_template.c
-
0build/test/cache/test_tictactoe.c
-
10build/test/dependencies/cmock.d
-
0build/test/dependencies/force_build
-
1build/test/dependencies/get_character.d
-
3build/test/dependencies/minesweeper_start.d
-
1build/test/dependencies/pong.d
-
2build/test/dependencies/snake_start.d
-
2build/test/dependencies/test_add.d
-
5build/test/dependencies/test_bomb_in_array.d
-
4build/test/dependencies/test_bomb_in_array_runner.d
-
4build/test/dependencies/test_cbrt.d
-
4build/test/dependencies/test_cbrt_runner.d
-
4build/test/dependencies/test_ceil.d
-
4build/test/dependencies/test_ceil_runner.d
-
4build/test/dependencies/test_checkCollision.d
-
4build/test/dependencies/test_checkCollision_runner.d
-
4build/test/dependencies/test_checkGameEnd.d
-
4build/test/dependencies/test_checkGameEnd_runner.d
-
4build/test/dependencies/test_clearScreen.d
-
4build/test/dependencies/test_clearScreen_runner.d
-
4build/test/dependencies/test_collision.d
-
4build/test/dependencies/test_collision_runner.d
-
4build/test/dependencies/test_divide.d
-
4build/test/dependencies/test_divide_runner.d
-
4build/test/dependencies/test_exp.d
-
4build/test/dependencies/test_exp2.d
-
4build/test/dependencies/test_exp2_runner.d
@ -1,7 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="VcsDirectoryMappings"> |
|||
<mapping directory="" vcs="Git" /> |
|||
<mapping directory="$PROJECT_DIR$/Unity" vcs="Git" /> |
|||
</component> |
|||
</project> |
@ -1,33 +0,0 @@ |
|||
cmake_minimum_required(VERSION 3.26) |
|||
project(arcade C) |
|||
|
|||
set(CMAKE_C_STANDARD 11) |
|||
|
|||
include_directories(src/main/c) |
|||
include_directories(src/main/c/GameTic_Tac_Toe) |
|||
include_directories(src/main/c/Hangman) |
|||
include_directories(src/main/c/Minesweeper) |
|||
include_directories(src/main/c/Pong) |
|||
include_directories(src/main/c/Snake) |
|||
|
|||
add_executable(arcade |
|||
src/main/c/GameTic_Tac_Toe/tictactoe.c |
|||
src/main/c/GameTic_Tac_Toe/tictactoe.h |
|||
src/main/c/Hangman/drawHangman.c |
|||
src/main/c/Hangman/drawHangman.h |
|||
src/main/c/Hangman/initializeHangman.c |
|||
src/main/c/Hangman/initializeHangman.h |
|||
src/main/c/Hangman/playHangman.c |
|||
src/main/c/Hangman/playHangman.h |
|||
src/main/c/Hangman/word_selector.c |
|||
src/main/c/Hangman/word_selector.h |
|||
src/main/c/Minesweeper/minesweeper_start.c |
|||
src/main/c/Minesweeper/minesweeper_start.h |
|||
src/main/c/Pong/pong.c |
|||
src/main/c/Pong/pong.h |
|||
src/main/c/Snake/get_character.c |
|||
src/main/c/Snake/get_character.h |
|||
src/main/c/Snake/snake_start.c |
|||
src/main/c/Snake/snake_start.h |
|||
src/main/c/main.c |
|||
src/main/c/main.h) |
@ -1,276 +0,0 @@ |
|||
--- |
|||
:project: |
|||
:use_exceptions: false |
|||
:use_mocks: true |
|||
:compile_threads: 1 |
|||
:test_threads: 1 |
|||
:use_test_preprocessor: true |
|||
:use_preprocessor_directives: false |
|||
:use_deep_dependencies: false |
|||
:generate_deep_dependencies: true |
|||
:auto_link_deep_dependencies: false |
|||
:test_file_prefix: test_ |
|||
:options_paths: [] |
|||
:release_build: true |
|||
:use_auxiliary_dependencies: true |
|||
:build_root: build |
|||
:which_ceedling: gem |
|||
:ceedling_version: 0.31.1 |
|||
:default_tasks: |
|||
- test:all |
|||
:release_build: |
|||
:use_assembly: false |
|||
:artifacts: [] |
|||
:paths: |
|||
:test: |
|||
- "+:test/**" |
|||
- "-:test/support" |
|||
:source: |
|||
- src/** |
|||
:support: |
|||
- test/support |
|||
:include: [] |
|||
:libraries: [] |
|||
:test_toolchain_include: [] |
|||
:release_toolchain_include: [] |
|||
:files: |
|||
:test: [] |
|||
:source: [] |
|||
:assembly: [] |
|||
:support: [] |
|||
:include: [] |
|||
:environment: |
|||
- :rake_columns: '120' |
|||
:defines: |
|||
:test: |
|||
- &1 [] |
|||
- TEST |
|||
:test_preprocess: |
|||
- *1 |
|||
- TEST |
|||
:release: [] |
|||
:release_preprocess: [] |
|||
:use_test_definition: false |
|||
:common: [] |
|||
:libraries: |
|||
:flag: "-l${1}" |
|||
:path_flag: "-L ${1}" |
|||
:test: [] |
|||
:test_preprocess: [] |
|||
:release: [] |
|||
:release_preprocess: [] |
|||
:placement: :end |
|||
:system: [] |
|||
:flags: {} |
|||
:extension: |
|||
:header: ".h" |
|||
:source: ".c" |
|||
:assembly: ".s" |
|||
:object: ".o" |
|||
:libraries: |
|||
- ".a" |
|||
- ".so" |
|||
:executable: ".out" |
|||
:map: ".map" |
|||
:list: ".lst" |
|||
:testpass: ".pass" |
|||
:testfail: ".fail" |
|||
:dependencies: ".d" |
|||
:unity: |
|||
:vendor_path: "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor" |
|||
:defines: [] |
|||
:cmock: |
|||
:vendor_path: "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor" |
|||
:defines: [] |
|||
:includes: [] |
|||
:mock_prefix: mock_ |
|||
:when_no_prototypes: :warn |
|||
:enforce_strict_ordering: true |
|||
:plugins: |
|||
- :ignore |
|||
- :callback |
|||
:treat_as: |
|||
uint8: HEX8 |
|||
uint16: HEX16 |
|||
uint32: UINT32 |
|||
int8: INT8 |
|||
bool: UINT8 |
|||
:mock_path: build/test/mocks |
|||
:verbosity: 3 |
|||
:unity_helper: false |
|||
:cexception: |
|||
:vendor_path: "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor" |
|||
:defines: [] |
|||
:test_runner: |
|||
:includes: [] |
|||
:file_suffix: _runner |
|||
:tools: |
|||
:test_compiler: |
|||
:executable: gcc |
|||
:name: default_test_compiler |
|||
:stderr_redirect: :none |
|||
:background_exec: :none |
|||
:optional: false |
|||
:arguments: |
|||
- '' |
|||
- '' |
|||
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR |
|||
- -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE |
|||
- "-D$": COLLECTION_DEFINES_TEST_AND_VENDOR |
|||
- "-DGNU_COMPILER" |
|||
- "-g" |
|||
- '' |
|||
- -c "${1}" |
|||
- -o "${2}" |
|||
- "-MMD" |
|||
- -MF "${4}" |
|||
:test_fixture: |
|||
:executable: "${1}" |
|||
:name: default_test_fixture |
|||
:stderr_redirect: :auto |
|||
:background_exec: :none |
|||
:optional: false |
|||
:arguments: [] |
|||
:test_linker: |
|||
:executable: gcc |
|||
:name: default_test_linker |
|||
:stderr_redirect: :none |
|||
:background_exec: :none |
|||
:optional: false |
|||
:arguments: |
|||
- '' |
|||
- '' |
|||
- '' |
|||
- '"${1}"' |
|||
- "${5}" |
|||
- -o "${2}" |
|||
- '' |
|||
- "${4}" |
|||
- '' |
|||
:test_file_preprocessor: |
|||
:executable: gcc |
|||
:name: default_test_file_preprocessor |
|||
:stderr_redirect: :none |
|||
:background_exec: :none |
|||
:optional: false |
|||
:arguments: |
|||
- '' |
|||
- '' |
|||
- "-E" |
|||
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR |
|||
- -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE |
|||
- "-D$": COLLECTION_DEFINES_TEST_AND_VENDOR |
|||
- "-D$": DEFINES_TEST_PREPROCESS |
|||
- "-DGNU_COMPILER" |
|||
- '"${1}"' |
|||
- -o "${2}" |
|||
:test_file_preprocessor_directives: |
|||
:executable: gcc |
|||
:name: default_test_file_preprocessor_directives |
|||
:stderr_redirect: :none |
|||
:background_exec: :none |
|||
:optional: false |
|||
:arguments: |
|||
- "-E" |
|||
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR |
|||
- -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE |
|||
- "-D$": COLLECTION_DEFINES_TEST_AND_VENDOR |
|||
- "-D$": DEFINES_TEST_PREPROCESS |
|||
- "-DGNU_COMPILER" |
|||
- "-fdirectives-only" |
|||
- '"${1}"' |
|||
- -o "${2}" |
|||
:test_includes_preprocessor: |
|||
:executable: gcc |
|||
:name: default_test_includes_preprocessor |
|||
:stderr_redirect: :none |
|||
:background_exec: :none |
|||
:optional: false |
|||
:arguments: |
|||
- '' |
|||
- '' |
|||
- "-E" |
|||
- "-MM" |
|||
- "-MG" |
|||
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR |
|||
- -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE |
|||
- "-D$": COLLECTION_DEFINES_TEST_AND_VENDOR |
|||
- "-D$": DEFINES_TEST_PREPROCESS |
|||
- "-DGNU_COMPILER" |
|||
- '"${1}"' |
|||
:release_compiler: |
|||
:executable: gcc |
|||
:name: default_release_compiler |
|||
:stderr_redirect: :none |
|||
:background_exec: :none |
|||
:optional: false |
|||
:arguments: |
|||
- '' |
|||
- '' |
|||
- -I"$": COLLECTION_PATHS_SOURCE_INCLUDE_VENDOR |
|||
- -I"$": COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE |
|||
- "-D$": COLLECTION_DEFINES_RELEASE_AND_VENDOR |
|||
- "-DGNU_COMPILER" |
|||
- '' |
|||
- -c "${1}" |
|||
- -o "${2}" |
|||
- "-MMD" |
|||
- -MF "${4}" |
|||
:release_linker: |
|||
:executable: gcc |
|||
:name: default_release_linker |
|||
:stderr_redirect: :none |
|||
:background_exec: :none |
|||
:optional: false |
|||
:arguments: |
|||
- '' |
|||
- '' |
|||
- '' |
|||
- '"${1}"' |
|||
- "${5}" |
|||
- -o "${2}" |
|||
- '' |
|||
- "${4}" |
|||
- '' |
|||
:test_compiler: |
|||
:arguments: [] |
|||
:test_linker: |
|||
:arguments: [] |
|||
:test_fixture: |
|||
:arguments: [] |
|||
:link_objects: [] |
|||
:test_includes_preprocessor: |
|||
:arguments: [] |
|||
:test_file_preprocessor: |
|||
:arguments: [] |
|||
:test_file_preprocessor_directives: |
|||
:arguments: [] |
|||
:test_dependencies_generator: |
|||
:arguments: [] |
|||
:release_compiler: |
|||
:arguments: [] |
|||
:release_linker: |
|||
:arguments: [] |
|||
:release_assembler: |
|||
:arguments: [] |
|||
:release_dependencies_generator: |
|||
:arguments: [] |
|||
:plugins: |
|||
:load_paths: |
|||
- "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/lib/../plugins" |
|||
:enabled: |
|||
- stdout_pretty_tests_report |
|||
- module_generator |
|||
:display_raw_test_results: false |
|||
:stdout_pretty_tests_report_path: "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/lib/../plugins/stdout_pretty_tests_report" |
|||
:module_generator_path: "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/lib/../plugins/module_generator" |
|||
:gcov: |
|||
:reports: |
|||
- HtmlDetailed |
|||
:gcovr: |
|||
:html_medium_threshold: 75 |
|||
:html_high_threshold: 90 |
|||
:module_generator: |
|||
:project_root: "./" |
|||
:source_root: src/ |
|||
:test_root: test/ |
@ -1 +0,0 @@ |
|||
build/release/out/c/Hallo_Welt.o: src/Hallo_Welt.c |
@ -1 +0,0 @@ |
|||
build/release/out/c/add_student.o: src/main/c/add_student.c |
@ -1 +0,0 @@ |
|||
build/release/out/c/add_subject.o: src/main/c/add_subject.c |
@ -1 +0,0 @@ |
|||
build/release/out/c/game100.o: src/main/c/Template/game100.c |
@ -1 +0,0 @@ |
|||
build/release/out/c/get_character.o: src/main/c/Snake/get_character.c |
@ -1,3 +0,0 @@ |
|||
build/release/out/c/main.o: src/main/c/main.c \ |
|||
src/main/c/Snake/snake_start.h \ |
|||
src/main/c/Minesweeper/minesweeper_start.h src/main/c/Pong/pong.h |
@ -1,3 +0,0 @@ |
|||
build/release/out/c/minesweeper_start.o: \ |
|||
src/main/c/Minesweeper/minesweeper_start.c \ |
|||
src/main/c/Minesweeper/minesweeper_start.h |
@ -1 +0,0 @@ |
|||
build/release/out/c/modify_student.o: src/main/c/modify_student.c |
@ -1 +0,0 @@ |
|||
build/release/out/c/modify_subject.o: src/main/c/modify_subject.c |
@ -1 +0,0 @@ |
|||
build/release/out/c/pong.o: src/main/c/Pong/pong.c |
@ -1 +0,0 @@ |
|||
build/release/out/c/show_statistics.o: src/main/c/show_statistics.c |
@ -1,2 +0,0 @@ |
|||
build/release/out/c/snake_start.o: src/main/c/Snake/snake_start.c \ |
|||
src/main/c/Snake/snake_start.h src/main/c/Snake/get_character.h |
@ -1,5 +0,0 @@ |
|||
build/release/out/c/testRunnerGenerator.o: \ |
|||
src/Unity/test/testdata/testRunnerGenerator.c \ |
|||
src/Unity/test/testdata/../../src/unity.h \ |
|||
src/Unity/test/testdata/../../src/unity_internals.h \ |
|||
src/Unity/test/testdata/Defs.h |
@ -1,3 +0,0 @@ |
|||
build/release/out/c/testRunnerGeneratorSmall.o: \ |
|||
src/Unity/test/testdata/testRunnerGeneratorSmall.c src/Unity/src/unity.h \ |
|||
src/Unity/src/unity_internals.h src/Unity/test/testdata/Defs.h |
@ -1,5 +0,0 @@ |
|||
build/release/out/c/testRunnerGeneratorWithMocks.o: \ |
|||
src/Unity/test/testdata/testRunnerGeneratorWithMocks.c \ |
|||
src/Unity/test/testdata/../../src/unity.h \ |
|||
src/Unity/test/testdata/../../src/unity_internals.h \ |
|||
src/Unity/test/testdata/Defs.h src/Unity/test/testdata/mockMock.h |
@ -1,5 +0,0 @@ |
|||
build/release/out/c/testsample_cmd.o: \ |
|||
src/Unity/test/expectdata/testsample_cmd.c \ |
|||
src/Unity/test/expectdata/../../src/unity.h \ |
|||
src/Unity/test/expectdata/../../src/unity_internals.h \ |
|||
src/Unity/test/testdata/CException.h |
@ -1 +0,0 @@ |
|||
build/release/out/c/tictactoe.o: src/main/c/GameTic_Tac_Toe/tictactoe.c |
@ -1 +0,0 @@ |
|||
build/release/out/c/top.o: src/main/c/Quiz/top.c |
@ -1,17 +1,5 @@ |
|||
--- |
|||
src/main/c/Template/game100.c: |
|||
- TEST |
|||
<<<<<<< HEAD |
|||
src/main/c/Calculator/calculator.c: |
|||
======= |
|||
src/main/c/Snake/snake_start.c: |
|||
- TEST |
|||
src/main/c/Snake/get_character.c: |
|||
- TEST |
|||
src/main/c/Minesweeper/minesweeper_start.c: |
|||
- TEST |
|||
src/main/c/GameTic_Tac_Toe/tictactoe.c: |
|||
- TEST |
|||
src/main/c/Pong/pong.c: |
|||
>>>>>>> 2acead7a056f156a3c7129d740f7d5585fbc805f |
|||
src/main/c/Template/game100.c: |
|||
- TEST |
@ -1,79 +0,0 @@ |
|||
#include "build/temp/../../src/main/c/Minesweeper/minesweeper_start.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){} |
|||
|
|||
void tearDown(void){} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_bomb_in_array(void){ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_Bool |
|||
|
|||
result; |
|||
|
|||
int array[] = {5, 9, 42, 6, 87, 95, 202, 13, 45 ,78}; |
|||
|
|||
int bomb = 42; |
|||
|
|||
int length = 10; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = array_contains_value(array, bomb, length); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
do {if ((result)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(22)));}} while(0); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_bomb_not_in_array(void){ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_Bool |
|||
|
|||
result; |
|||
|
|||
int array[] = {5, 9, 42, 6, 87, 95, 202, 13, 45 ,78}; |
|||
|
|||
int bomb = 0; |
|||
|
|||
int length = 10; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = array_contains_value(array, bomb, length); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
do {if (!(result)) {} else {UnityFail( ((" Expected FALSE Was TRUE")), (UNITY_UINT)((UNITY_UINT)(37)));}} while(0); |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_cbrt(void){ |
|||
|
|||
|
|||
|
|||
double result; |
|||
|
|||
double a = 4; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = cbrt(4); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((1.587401052)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(22), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_ceil(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
double a =2.34; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = ceil(a); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -1,143 +0,0 @@ |
|||
#include "src/main/c/Pong/pong.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
typedef struct { |
|||
|
|||
int x; |
|||
|
|||
int y; |
|||
|
|||
int speedX; |
|||
|
|||
int speedY; |
|||
|
|||
} Ball; |
|||
|
|||
|
|||
|
|||
typedef struct { |
|||
|
|||
int x; |
|||
|
|||
int y; |
|||
|
|||
int width; |
|||
|
|||
int height; |
|||
|
|||
} Paddle; |
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_checkCollision(void){ |
|||
|
|||
Ball ball = {10, 10, 1, 1}; |
|||
|
|||
Paddle paddle = {50, 10, 5, 10}; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
ball.x = 0; |
|||
|
|||
int result1 = checkCollision(ball, paddle.y, paddle.y); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result1)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(35), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
|
|||
|
|||
ball.x = 40 - 1; |
|||
|
|||
int result2 = checkCollision(ball, paddle.y, paddle.y); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result2)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(39), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
ball.x = 5; |
|||
|
|||
ball.y = 0; |
|||
|
|||
int result3 = checkCollision(ball, paddle.y, paddle.y); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result3)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(45), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
|
|||
|
|||
ball.y = 20 - 1; |
|||
|
|||
int result4 = checkCollision(ball, paddle.y, paddle.y); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result4)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(49), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
ball.x = paddle.x - 1; |
|||
|
|||
ball.y = paddle.y + 1; |
|||
|
|||
int result5 = checkCollision(ball, paddle.y, paddle.y); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result5)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(55), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
|
|||
|
|||
ball.x = paddle.x + 1; |
|||
|
|||
ball.y = paddle.y + 1; |
|||
|
|||
int result6 = checkCollision(ball, paddle.y, paddle.y); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result6)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(60), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -1,69 +0,0 @@ |
|||
#include "src/main/c/Pong/pong.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_checkGameEnd(void){ |
|||
|
|||
|
|||
|
|||
int maxScore = 5; |
|||
|
|||
int score1 = 4, score2 = 2; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
int result = checkGameEnd(score1, score2, maxScore); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
score1 = 5; |
|||
|
|||
result = checkGameEnd(score1, score2, maxScore); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -1,73 +0,0 @@ |
|||
#include "src/main/c/Pong/pong.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
char screen[20][40 +1]; |
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_clearScreen(void){ |
|||
|
|||
|
|||
|
|||
int i, j; |
|||
|
|||
for (i = 0; i < 20; i++) { |
|||
|
|||
for (j = 0; j < 40; j++) { |
|||
|
|||
screen[i][j] = ' '; |
|||
|
|||
} |
|||
|
|||
screen[i][j] = '\0'; |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
clearScreen(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
for (i = 0; i < 20; i++) { |
|||
|
|||
for (j = 0; j < 40; j++) { |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((' ')), (UNITY_INT)((screen[i][j])), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(33), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
} |
@ -1,102 +0,0 @@ |
|||
#include "src/main/c/Snake/get_character.h" |
|||
#include "src/main/c/Snake/snake_start.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){} |
|||
|
|||
void tearDown(void){} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_self_collision(void){ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_Bool |
|||
|
|||
result; |
|||
|
|||
Snake snake = {1, 5, {6 + 16 * 6, 6 + 16 * 7, 7 + 16 * 7, 7 + 16 * 6, 6 + 16 * 6}}; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = check_if_dead(&snake); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
do {if ((result)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(21)));}} while(0); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_no_collision(void){ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_Bool |
|||
|
|||
result; |
|||
|
|||
Snake snake = initialize_snake(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = check_if_dead(&snake); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
do {if (!(result)) {} else {UnityFail( ((" Expected FALSE Was TRUE")), (UNITY_UINT)((UNITY_UINT)(34)));}} while(0); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_wall_collision(void){ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_Bool |
|||
|
|||
result; |
|||
|
|||
Snake snake = {-1, 4, {0 + 16 * 6, 1 + 16 * 6, 2 + 16 * 6, 3 + 16 * 6}}; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = check_if_dead(&snake); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
do {if ((result)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(47)));}} while(0); |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_divide(void){ |
|||
|
|||
|
|||
|
|||
double num1 = 9; |
|||
|
|||
double num2 = 3; |
|||
|
|||
double division = num1 / num2; |
|||
|
|||
double result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = division; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((3)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(24), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_exp(void) { |
|||
|
|||
|
|||
|
|||
double result; |
|||
|
|||
double a =1; |
|||
|
|||
double exponent = exp(a); |
|||
|
|||
|
|||
|
|||
result = exponent; |
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(16), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_fmin(void){ |
|||
|
|||
|
|||
|
|||
double num1 =1; |
|||
|
|||
double num2 = 8; |
|||
|
|||
double result; |
|||
|
|||
double min = fmin(1,8); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = min; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(24), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_floor(void){ |
|||
|
|||
|
|||
|
|||
double result; |
|||
|
|||
double num1 = 7.12; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = floor(num1); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((7)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(22), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
void test_fmax(void){ |
|||
|
|||
|
|||
|
|||
double result; |
|||
|
|||
double num1; |
|||
|
|||
double num2; |
|||
|
|||
double max = fmax(14.4,3.4); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = max; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((14.4)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(25), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_fmin(void){ |
|||
|
|||
|
|||
|
|||
double num1; |
|||
|
|||
double num2; |
|||
|
|||
double result = fmin(1,16); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
return result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -1,269 +0,0 @@ |
|||
#include "build/temp/../../src/main/c/Minesweeper/minesweeper_start.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){} |
|||
|
|||
void tearDown(void){} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_detect_not_valid_tile_left(void){ |
|||
|
|||
|
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = 0; |
|||
|
|||
int direction = 2; |
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = is_Valid_tile(&board, tile, direction); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((-1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(21), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_detect_not_valid_tile_up(void){ |
|||
|
|||
|
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = 0; |
|||
|
|||
int direction = 3; |
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = is_Valid_tile(&board, tile, direction); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((-1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(35), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_detect_not_valid_tile_right(void){ |
|||
|
|||
|
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = board.width * board.height - 1; |
|||
|
|||
int direction = 5; |
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = is_Valid_tile(&board, tile, direction); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((-1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(49), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_detect_not_valid_tile_down(void){ |
|||
|
|||
|
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = board.width * board.height - 1; |
|||
|
|||
int direction = 4; |
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = is_Valid_tile(&board, tile, direction); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((-1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(63), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_detect_valid_tile_left(void){ |
|||
|
|||
|
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = board.width * board.height - 1; |
|||
|
|||
int direction = 2; |
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = is_Valid_tile(&board, tile, direction); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((board.width * board.height - 2)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(77), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_detect_valid_tile_up(void){ |
|||
|
|||
|
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = board.width * board.height - 1; |
|||
|
|||
int direction = 3; |
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = is_Valid_tile(&board, tile, direction); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((board.width * (board.height - 1) - 1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(91), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_detect_valid_tile_right(void){ |
|||
|
|||
|
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = 0; |
|||
|
|||
int direction = 5; |
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = is_Valid_tile(&board, tile, direction); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_detect_valid_tile_down(void){ |
|||
|
|||
|
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = 0; |
|||
|
|||
int direction = 4; |
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = is_Valid_tile(&board, tile, direction); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0 + board.width)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(119), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_log(void){ |
|||
|
|||
|
|||
|
|||
double result; |
|||
|
|||
double a=4; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = log(a); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((4)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(22), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_log10(void){ |
|||
|
|||
|
|||
|
|||
double result; |
|||
|
|||
double a = 20; |
|||
|
|||
result = log10(a); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
return result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((20)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_mod(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = mod(10, 5); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(22), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -1,142 +0,0 @@ |
|||
#include "build/temp/../../src/main/c/Snake/get_character.h" |
|||
#include "build/temp/../../src/main/c/Snake/snake_start.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){} |
|||
|
|||
void tearDown(void){} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_moving_right(void){ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_Bool |
|||
|
|||
result; |
|||
|
|||
Snake snake = {1, 3, {8 + 16 * 6, 7 + 16 * 6, 6 + 16 * 6}}; |
|||
|
|||
Snake expected = {1, 3, {9 + 16 * 6, 8 + 16 * 6, 7 + 16 * 6}}; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
move_snake(&snake); |
|||
|
|||
result = memcmp(&snake, &expected, sizeof(Snake)) == 0; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
do {if ((result)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(24)));}} while(0); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_moving_down(void){ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_Bool |
|||
|
|||
result; |
|||
|
|||
Snake snake = {16, 3, {8 + 16 * 6, 7 + 16 * 6, 6 + 16 * 6}}; |
|||
|
|||
Snake expected = {16, 3, {8 + 16 * 7, 8 + 16 * 6, 7 + 16 * 6}}; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
move_snake(&snake); |
|||
|
|||
result = memcmp(&snake, &expected, sizeof(Snake)) == 0; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
do {if ((result)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(38)));}} while(0); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_moving_left(void){ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_Bool |
|||
|
|||
result; |
|||
|
|||
Snake snake = {-1, 3, {8 + 16 * 6, 7 + 16 * 6, 6 + 16 * 6}}; |
|||
|
|||
Snake expected = {-1, 3, {7 + 16 * 6, 8 + 16 * 6, 7 + 16 * 6}}; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
move_snake(&snake); |
|||
|
|||
result = memcmp(&snake, &expected, sizeof(Snake)) == 0; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
do {if ((result)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(52)));}} while(0); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_moving_up(void){ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_Bool |
|||
|
|||
result; |
|||
|
|||
Snake snake = {-16, 3, {8 + 16 * 6, 7 + 16 * 6, 6 + 16 * 6}}; |
|||
|
|||
Snake expected = {-16, 3, {8 + 16 * 5, 8 + 16 * 6, 7 + 16 * 6}}; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
move_snake(&snake); |
|||
|
|||
result = memcmp(&snake, &expected, sizeof(Snake)) == 0; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
do {if ((result)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(66)));}} while(0); |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
#include "src/main/c/Template/game100.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_mulitply(void){ |
|||
|
|||
|
|||
|
|||
int num1=5; |
|||
|
|||
int num2=5; |
|||
|
|||
int product = num1 * num2; |
|||
|
|||
|
|||
|
|||
int result = product; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((25)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(22), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -1,205 +0,0 @@ |
|||
#include "build/temp/../../src/main/c/Minesweeper/minesweeper_start.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){} |
|||
|
|||
void tearDown(void){} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_no_bombs_placed_around_tile(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = 0 + board.width * 1; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = number_of_bombs(&board, tile); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(21), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_searching_for_bombs_on_correct_tiles(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = 0 + board.width * 1; |
|||
|
|||
board.bombs[0] = 0 + board.width * 3; |
|||
|
|||
board.bombs[1] = 2 + board.width * 1; |
|||
|
|||
board.bombs[2] = board.width - 1 + board.width * 1; |
|||
|
|||
board.bombs[3] = 0 + board.width * (board.height - 1); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = number_of_bombs(&board, tile); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(38), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_2_bombs_around_tile(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = 0 + board.width * 1; |
|||
|
|||
board.bombs[0] = 0 + board.width * 2; |
|||
|
|||
board.bombs[1] = 1 + board.width * 1; |
|||
|
|||
board.bombs[2] = board.width - 1 + board.width * 1; |
|||
|
|||
board.bombs[3] = 0 + board.width * (board.height - 1); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = number_of_bombs(&board, tile); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(55), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_5_bombs_around_tile(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = 1 + board.width * 0; |
|||
|
|||
board.bombs[0] = 0 + board.width * 0; |
|||
|
|||
board.bombs[1] = 2 + board.width * 0; |
|||
|
|||
board.bombs[2] = 0 + board.width * 1; |
|||
|
|||
board.bombs[3] = 1 + board.width * 1; |
|||
|
|||
board.bombs[4] = 2 + board.width * 1; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = number_of_bombs(&board, tile); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((5)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(73), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_8_bombs_around_tile(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
Minesweeper_Board board = initialize_minesweeper(); |
|||
|
|||
int tile = 7 + board.width * 7; |
|||
|
|||
board.bombs[0] = 6 + board.width * 6; |
|||
|
|||
board.bombs[1] = 7 + board.width * 6; |
|||
|
|||
board.bombs[2] = 8 + board.width * 6; |
|||
|
|||
board.bombs[3] = 6 + board.width * 7; |
|||
|
|||
board.bombs[4] = 8 + board.width * 7; |
|||
|
|||
board.bombs[5] = 6 + board.width * 8; |
|||
|
|||
board.bombs[6] = 7 + board.width * 8; |
|||
|
|||
board.bombs[7] = 8 + board.width * 8; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = number_of_bombs(&board, tile); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((8)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(94), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -1,102 +0,0 @@ |
|||
#include "build/temp/../../src/main/c/Snake/get_character.h" |
|||
#include "build/temp/../../src/main/c/Snake/snake_start.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){} |
|||
|
|||
void tearDown(void){} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_find_head(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
Snake snake = initialize_snake(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = part_of_snake(&snake, 8 * 16 + 8); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(20), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_get_correct_index(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
Snake snake = initialize_snake(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = part_of_snake(&snake, 8 * 16 + 6); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(33), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_snake_not_on_tile(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
Snake snake = initialize_snake(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = part_of_snake(&snake, 6 * 16 + 6); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((-1)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(46), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -1,83 +0,0 @@ |
|||
#include "src/main/c/Pong/pong.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
typedef struct { |
|||
|
|||
int x; |
|||
|
|||
int y; |
|||
|
|||
int speedX; |
|||
|
|||
int speedY; |
|||
|
|||
} Paddle; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
void test_playerInputMovement(void){ |
|||
|
|||
|
|||
|
|||
int paddlePositionY = 10; |
|||
|
|||
int userInput = -1; |
|||
|
|||
int expectedY = paddlePositionY - 1; |
|||
|
|||
|
|||
|
|||
processPlayerInput(&paddlePositionY, userInput); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((expectedY)), (UNITY_INT)((paddlePositionY)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(27), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
userInput = 1; |
|||
|
|||
expectedY = paddlePositionY + 1; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
processPlayerInput(&paddlePositionY, userInput); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((expectedY)), (UNITY_INT)((paddlePositionY)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(35), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -1,51 +0,0 @@ |
|||
#include "src/main/c/Pong/pong.h" |
|||
#include "/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_input_all_5(void){ |
|||
|
|||
|
|||
|
|||
int a = 4, b = 5; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
resetScore( &a, &b ); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((a)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(21), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((b)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(22), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_round(void){ |
|||
|
|||
|
|||
|
|||
double num1= 3.7; |
|||
|
|||
double result; |
|||
|
|||
double rounding = round(num1); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = rounding; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((3)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_sin(void){ |
|||
|
|||
|
|||
|
|||
double num1=20; |
|||
|
|||
double result; |
|||
|
|||
double sine = num1 * |
|||
|
|||
3.14159265358979323846 |
|||
|
|||
/180.0; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = sine; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((0.34)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_sqrt(void){ |
|||
|
|||
|
|||
|
|||
double result; |
|||
|
|||
int a = 25; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = sqrt(25); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((5)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(22), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
#include "src/main/c/Calculator/calculator.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_subtract(void){ |
|||
|
|||
|
|||
|
|||
int num1 = 14; |
|||
|
|||
int num2 = 7; |
|||
|
|||
int result; |
|||
|
|||
int subtraction = num1 - num2; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = subtraction; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((7)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(24), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -1,73 +0,0 @@ |
|||
#include "src/main/c/Template/game100.h" |
|||
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void setUp(void){ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
void tearDown(void){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_input_all_5(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = some_function(5, 5); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((6)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(21), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
void test_ignore_rest_from_division(void){ |
|||
|
|||
|
|||
|
|||
int result; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
result = some_function(5, 6); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
UnityAssertEqualNumber((UNITY_INT)((5)), (UNITY_INT)((result)), ( |
|||
|
|||
((void *)0) |
|||
|
|||
), (UNITY_UINT)(33), UNITY_DISPLAY_STYLE_INT); |
|||
|
|||
} |
@ -1,6 +1,6 @@ |
|||
build/test/out/c/cmock.o: \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock_internals.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock_internals.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
@ -1 +0,0 @@ |
|||
build/test/out/c/get_character.o: src/main/c/Snake/get_character.c |
@ -1,3 +0,0 @@ |
|||
build/test/out/c/minesweeper_start.o: \ |
|||
src/main/c/Minesweeper/minesweeper_start.c \ |
|||
src/main/c/Minesweeper/minesweeper_start.h |
@ -1 +0,0 @@ |
|||
build/test/out/c/pong.o: src/main/c/Pong/pong.c |
@ -1,2 +0,0 @@ |
|||
build/test/out/c/snake_start.o: src/main/c/Snake/snake_start.c \ |
|||
src/main/c/Snake/snake_start.h src/main/c/Snake/get_character.h |
@ -1,4 +1,4 @@ |
|||
build/test/out/c/test_add.o: test/Calculator/test_add.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
test/Calculator/../../src/main/c/Calculator/calculator.h |
|||
src/main/c/Template/game100.h |
@ -1,5 +0,0 @@ |
|||
build/test/out/c/test_bomb_in_array.o: \ |
|||
test/Minesweeper/test_bomb_in_array.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
test/Minesweeper/../../src/main/c/Minesweeper/minesweeper_start.h |
@ -1,4 +0,0 @@ |
|||
build/test/out/c/test_bomb_in_array_runner.o: \ |
|||
build/test/runners/test_bomb_in_array_runner.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
@ -0,0 +1,4 @@ |
|||
build/test/out/c/test_cbrt.o: test/Calculator/test_cbrt.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
src/main/c/Calculator/calculator.h |
@ -1,4 +1,4 @@ |
|||
build/test/out/c/test_template_runner.o: \ |
|||
build/test/runners/test_template_runner.c \ |
|||
build/test/out/c/test_cbrt_runner.o: \ |
|||
build/test/runners/test_cbrt_runner.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
@ -0,0 +1,4 @@ |
|||
build/test/out/c/test_ceil.o: test/Calculator/test_ceil.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
src/main/c/Calculator/calculator.h |
@ -0,0 +1,4 @@ |
|||
build/test/out/c/test_ceil_runner.o: \ |
|||
build/test/runners/test_ceil_runner.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
@ -1,4 +0,0 @@ |
|||
build/test/out/c/test_checkCollision.o: test/Pong/test_checkCollision.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
src/main/c/Pong/pong.h |
@ -1,4 +0,0 @@ |
|||
build/test/out/c/test_checkCollision_runner.o: \ |
|||
build/test/runners/test_checkCollision_runner.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
@ -1,4 +0,0 @@ |
|||
build/test/out/c/test_checkGameEnd.o: test/Pong/test_checkGameEnd.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
src/main/c/Pong/pong.h |
@ -1,4 +0,0 @@ |
|||
build/test/out/c/test_checkGameEnd_runner.o: \ |
|||
build/test/runners/test_checkGameEnd_runner.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
@ -1,4 +0,0 @@ |
|||
build/test/out/c/test_clearScreen.o: test/Pong/test_clearScreen.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
src/main/c/Pong/pong.h |
@ -1,4 +0,0 @@ |
|||
build/test/out/c/test_clearScreen_runner.o: \ |
|||
build/test/runners/test_clearScreen_runner.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
@ -1,4 +0,0 @@ |
|||
build/test/out/c/test_collision.o: test/Snake/test_collision.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
src/main/c/Snake/snake_start.h src/main/c/Snake/get_character.h |
@ -1,4 +0,0 @@ |
|||
build/test/out/c/test_collision_runner.o: \ |
|||
build/test/runners/test_collision_runner.c \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
@ -0,0 +1,4 @@ |
|||
build/test/out/c/test_divide.o: test/Calculator/test_divide.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
src/main/c/Calculator/calculator.h |
@ -0,0 +1,4 @@ |
|||
build/test/out/c/test_divide_runner.o: \ |
|||
build/test/runners/test_divide_runner.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
@ -0,0 +1,4 @@ |
|||
build/test/out/c/test_exp.o: test/Calculator/test_exp.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
src/main/c/Calculator/calculator.h |
@ -0,0 +1,4 @@ |
|||
build/test/out/c/test_exp2.o: test/Calculator/test_exp2.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ |
|||
src/main/c/Calculator/calculator.h |
@ -0,0 +1,4 @@ |
|||
build/test/out/c/test_exp2_runner.o: \ |
|||
build/test/runners/test_exp2_runner.c \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ |
|||
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue