Skip to content
Snippets Groups Projects
test_myName.m 360 B
Newer Older
% Test file

Laurent Heirendt's avatar
Laurent Heirendt committed
addpath(genpath('../src/'))  % add this folder and all subfolders to the path
Laurent Heirendt's avatar
Laurent Heirendt committed
c = addTwoNumbers_myName(1, 2)
% test if the addition function works as expected
Laurent Heirendt's avatar
Laurent Heirendt committed
%assert(c == 3)
Laurent Heirendt's avatar
Laurent Heirendt committed
d = multiplyTwoNumbers_myName(c, c)
% test if the multiplication function works as expected
Laurent Heirendt's avatar
Laurent Heirendt committed
%assert(d == 9)
% test my sqrt function
Laurent Heirendt's avatar
Laurent Heirendt committed
%assert(sqrt_myName(d) == sqrt(d))