summary refs log tree commit diff stats
path: root/tests/converter
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-08-13 01:30:42 +0200
committerAraq <rumpf_a@web.de>2014-08-13 01:30:42 +0200
commit4d8c127838f692860b5e30314c1959b84e5dbcff (patch)
tree0d661ab36f9aaf7858fe9789de2e38f64545db39 /tests/converter
parent62e454f41beb5a742dbb8137198629fdc1f1153a (diff)
downloadNim-4d8c127838f692860b5e30314c1959b84e5dbcff.tar.gz
made some tests green
Diffstat (limited to 'tests/converter')
-rw-r--r--tests/converter/tconvert.nim34
1 files changed, 4 insertions, 30 deletions
diff --git a/tests/converter/tconvert.nim b/tests/converter/tconvert.nim
index a8ddcf119..a37140234 100644
--- a/tests/converter/tconvert.nim
+++ b/tests/converter/tconvert.nim
@@ -1,5 +1,3 @@
-import
-  Cairo
 
 converter FloatConversion64(x: int): float64 = return toFloat(x)
 converter FloatConversion32(x: int): float32 = return toFloat(x)
@@ -7,34 +5,10 @@ converter FloatConversionPlain(x: int): float = return toFloat(x)
 
 const width = 500
 const height = 500
-const outFile = "CairoTest.png"
-
-var surface = Cairo.ImageSurfaceCreate(CAIRO.FORMAT_RGB24, width, height)
-var ç = Cairo.Create(surface)
-
-ç.SetSourceRGB(1, 1, 1)
-ç.Paint()
-
-ç.SetLineWidth(10)
-ç.SetLineCap(CAIRO.LINE_CAP_ROUND)
-
-const count = 12
-var winc = width / count
-var hinc = width / count
-for i in 1 .. count-1:
-  var amount = i / count
-  ç.SetSourceRGB(0, 1 - amount, amount)
-  ç.MoveTo(i * winc, hinc)
-  ç.LineTo(width - i * winc, height - hinc)
-  ç.Stroke()
-
-  ç.SetSourceRGB(1 - amount, 0, amount)
-  ç.MoveTo(winc, i * hinc)
-  ç.LineTo(width - winc, height - i * hinc)
-  ç.Stroke()
-
-echo(surface.WriteToPNG(outFile))
-surface.Destroy()
+
+proc ImageSurfaceCreate(w, h: float) = discard
+
+ImageSurfaceCreate(width, height)
 
 type TFoo = object