Files
JuliaFEM.jl/docs/tutorials/2015-07-04-hello-world-functional-tests-part-1.ipynb
T
2015-07-05 17:02:17 +03:00

92 lines
1.9 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# First steps toward functional testing, part 1\n",
"\n",
"Author(s): Jukka Aho <jukka.aho@kapsi.fi>\n",
"\n",
"Abstract: This is demonstration document describing how to combine functional testing, continous integration and documentation in to the single document.\n",
"\n",
"These multi-purposal documents test several things at once. While they test that documentation is up-to-date, calculation results are what is expected and code base is working, they also serve as a tutorials and examples how to use JuliaFEM."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's start. **Hello world**. *Local* time is here"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"Libc.strftime(time())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Using FactCheck to validate your results"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"f(x) = 2*x\n",
"f(1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"using FactCheck"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"facts(\"test that f(1) equals to 3, this is failing on purpose\") do\n",
" @fact f(1) => 3\n",
"end"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 0.4.0-dev",
"language": "julia",
"name": "julia-0.4"
},
"language_info": {
"name": "julia",
"version": "0.4.0"
}
},
"nbformat": 4,
"nbformat_minor": 0
}