Skip to content

Instantly share code, notes, and snippets.

@mrjoshuak
Created February 20, 2014 16:48
Show Gist options
  • Save mrjoshuak/9118170 to your computer and use it in GitHub Desktop.
Save mrjoshuak/9118170 to your computer and use it in GitHub Desktop.
import QtQuick 2.0
import QtTest 1.0
TestCase {
id: mathTests
name: "MathTests"
function test_math() {
compare(2 + 2, 4, "2 + 2 = 4")
}
function test_fail() {
compare(2 + 2, 5, "2 + 2 = 5")
}
Component.onCompleted: {
mathTests.test_power = function() { compare(Math.pow(4,3), 64, "4^3 = 64") }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment