Browse Source

Initial commit

master
Sophia Weber 11 months ago
commit
966a44116a
  1. 3
      .gitignore
  2. 7
      build-project.sh
  3. 101
      project.yml
  4. 15
      src/helloWorld.c
  5. 8
      src/helloWorld.h
  6. 4
      src/main.c
  7. 6
      team.md
  8. 0
      test/support/.gitkeep
  9. 32
      test/test_helloWorld.c

3
.gitignore

@ -0,0 +1,3 @@
.vscode
build
*.out

7
build-project.sh

@ -0,0 +1,7 @@
#!/bin/bash
if test -d build; then
rm -r build
fi
ceedling test:all
ceedling release
cp build/release/Rechner.out Rechner.out

101
project.yml

@ -0,0 +1,101 @@
---
# Notes:
# Sample project C code is not presently written to produce a release artifact.
# As such, release build options are disabled.
# This sample, therefore, only demonstrates running a collection of unit tests.
:project:
:use_exceptions: FALSE
:use_test_preprocessor: TRUE
:use_auxiliary_dependencies: TRUE
:build_root: build
:release_build: TRUE
:test_file_prefix: test_
:which_ceedling: gem
:ceedling_version: 0.31.1
:default_tasks:
- test:all
:test_build:
:use_assembly: TRUE
:release_build:
:output: Rechner.out
:use_assembly: FALSE
:environment:
:extension:
:executable: .out
:paths:
:test:
- +:test/**
- -:test/support
:source:
- src/**
:support:
- test/support
:libraries: []
:defines:
# in order to add common defines:
# 1) remove the trailing [] from the :common: section
# 2) add entries to the :common: section (e.g. :test: has TEST defined)
:common: &common_defines []
:test:
- *common_defines
- TEST
:test_preprocess:
- *common_defines
- TEST
:cmock:
: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
# Add -gcov to the plugins list to make sure of the gcov plugin
# You will need to have gcov and gcovr both installed to make it work.
# For more information on these options, see docs in plugins/gcov
:gcov:
:reports:
- HtmlDetailed
:gcovr:
:html_medium_threshold: 75
:html_high_threshold: 90
#:tools:
# Ceedling defaults to using gcc for compiling, linking, etc.
# As [:tools] is blank, gcc will be used (so long as it's in your system path)
# See documentation to configure a given toolchain for use
# LIBRARIES
# These libraries are automatically injected into the build process. Those specified as
# common will be used in all types of builds. Otherwise, libraries can be injected in just
# tests or releases. These options are MERGED with the options in supplemental yaml files.
:libraries:
:placement: :end
:flag: "-l${1}"
:path_flag: "-L ${1}"
:system: [] # for example, you might list 'm' to grab the math library
:test: []
:release: []
:plugins:
:load_paths:
- "#{Ceedling.load_path}"
:enabled:
- stdout_pretty_tests_report
- module_generator
...

15
src/helloWorld.c

@ -0,0 +1,15 @@
#include "helloWorld.h"
uint8_t Jill = 0x00;
uint8_t Jung = 0xFF;
uint8_t Jukk = 0x00;
int8_t do_bit_man(int8_t position)
{
if( ( position < 0 ) || ( position > 7 ) )
{
//position should be 0 to 7. Because we are going to modify 8 bit value.
return -1;
}
return 0;
}

8
src/helloWorld.h

@ -0,0 +1,8 @@
#ifndef HELLOWORLD_H
#define HELLOWORLD_H
#include <stdint.h>
int8_t do_bit_man(int8_t position);
#endif // HELLOWORLD_H

4
src/main.c

@ -0,0 +1,4 @@
#include "helloWorld.h"
void main() {
}

6
team.md

@ -0,0 +1,6 @@
- Jan Heidekrüger, fdai7848
- Inna Röhrig, fdai7851
- Justin Trausch, fdai7720
- Sophia Weber, fdai7828
- Salma zouaghi , fdai7930
- Dennis Sperzel, fdai7859

0
test/support/.gitkeep

32
test/test_helloWorld.c

@ -0,0 +1,32 @@
#ifdef TEST
#include "unity.h"
#include "helloWorld.h"
extern uint8_t Jill;
extern uint8_t Jung;
extern uint8_t Jukk;
void setUp(void)
{
Jill = 0x00;
Jung = 0xFF;
Jukk = 0x00;
}
void tearDown(void)
{
}
void test_math_do_bit_man_0(void)
{
int8_t result;
result = do_bit_man( 15 );
TEST_ASSERT_EQUAL_INT8( -1, result );
TEST_ASSERT_EQUAL_INT8( 0x00, Jill );
TEST_ASSERT_EQUAL_INT8( 0xFF, Jung );
TEST_ASSERT_EQUAL_INT8( 0x00, Jukk );
}
#endif // TEST
Loading…
Cancel
Save