Add material for testing (#11)

* Add first draft material for testing

* added some first test stuff in julia

* add asserti error

* Rework intro slides

* added package

* Wrap up testing slides expect demo

* Smooth demo part

* Add statement on tests

* Remove previous python exercise file

---------

Co-authored-by: behinger (s-ccs 001) <benedikt.ehinger@vis.uni-stuttgart.de>
This commit is contained in:
Benjamin Uekermann
2023-10-06 15:54:38 +02:00
committed by GitHub
parent e6f7ff3ed1
commit 937a8a9481
14 changed files with 448 additions and 6 deletions

View File

@@ -0,0 +1,6 @@
module MyTestPackage
include("find.jl")
export find_max
export find_mean
end # module MyTestPackage

View File

@@ -0,0 +1,16 @@
function find_max(x::AbstractVector)
@assert all(!isnan,x)
currentmax = x[1]
for a = eachindex(x)
if x[a] > currentmax
currentmax = x[a]
end
end
return currentmax
end
function find_mean(x::AbstractVector)
@assert all(!isnan,x)
return sum(x)./length(x)
end