Skip to content

Commit

Permalink
First PullRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperOSSO committed Dec 5, 2023
1 parent b5ea5a7 commit e8f87d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/sum/sum.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "sum.hpp"

auto sum(int a, int b) ->int {
return a + b;
auto sum(int a, int b, int c) ->int {
return a + b + c;
}
2 changes: 1 addition & 1 deletion src/main/sum/sum.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef SUM_HPP
#define SUM_HPP

auto sum(int a, int b) -> int;
auto sum(int a , int b , int c ) -> int;

#endif
11 changes: 6 additions & 5 deletions src/test/SumTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

#include "../main/sum/sum.hpp"

TEST(FIRSTTEST, SUMTEST){
int a = 10;
int b = 15;

ASSERT_EQ(sum(a, b), a + b);
TEST(MyFirstTest, SumTest){
int aa = 1;
int b = 2;
int c = 3;
int d = aa + b + c;
ASSERT_EQ(sum(aa, b, c), d);
}

0 comments on commit e8f87d4

Please sign in to comment.