improved base and added PP defines KERNEL_UPSTREAM TESTING DEBUG
This commit is contained in:
24
um/test/math_module.cpp
Normal file
24
um/test/math_module.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "math_module.h"
|
||||
|
||||
MathModule::MathModule() {
|
||||
// Constructor, if any initialization is needed
|
||||
}
|
||||
|
||||
int MathModule::add(int a, int b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
int MathModule::subtract(int a, int b) {
|
||||
return a - b;
|
||||
}
|
||||
|
||||
int MathModule::multiply(int a, int b) {
|
||||
return a * b;
|
||||
}
|
||||
|
||||
double MathModule::divide(double a, double b) {
|
||||
if (b == 0) {
|
||||
throw "Division by zero is not allowed.";
|
||||
}
|
||||
return a / b;
|
||||
}
|
||||
Reference in New Issue
Block a user