f-spot r4690 - in trunk: Tests/src src
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4690 - in trunk: Tests/src src
- Date: Wed, 7 Jan 2009 15:10:02 +0000 (UTC)
Author: sdelcroix
Date: Wed Jan 7 15:10:02 2009
New Revision: 4690
URL: http://svn.gnome.org/viewvc/f-spot?rev=4690&view=rev
Log:
fix test build
Added:
trunk/Tests/src/ImageTest.cs
- copied, changed from r4689, /trunk/src/ImageTest.cs
Removed:
trunk/src/ImageTest.cs
Modified:
trunk/Tests/src/IBrowsableItem.cs
trunk/Tests/src/Makefile
trunk/Tests/src/ThumbnailGenerator.cs
Modified: trunk/Tests/src/IBrowsableItem.cs
==============================================================================
--- trunk/Tests/src/IBrowsableItem.cs (original)
+++ trunk/Tests/src/IBrowsableItem.cs Wed Jan 7 15:10:02 2009
@@ -35,7 +35,7 @@
collection.Add (new System.Uri ("file:///test.png"));
Assert.IsFalse (changed);
- collection.MarkChanged (0);
+ collection.MarkChanged (new BrowsableEventArgs (0, FullInvalidate.Instance));
Assert.IsTrue (changed);
changed = false;
Copied: trunk/Tests/src/ImageTest.cs (from r4689, /trunk/src/ImageTest.cs)
==============================================================================
Modified: trunk/Tests/src/Makefile
==============================================================================
--- trunk/Tests/src/Makefile (original)
+++ trunk/Tests/src/Makefile Wed Jan 7 15:10:02 2009
@@ -4,6 +4,7 @@
SOURCES = \
IBrowsableItem.cs \
+ ImageTest.cs \
PhotoStore.cs \
TagStore.cs \
ThumbnailGenerator.cs \
@@ -21,6 +22,7 @@
-r:../../src/FSpot.Core.dll \
-r:../../src/FSpot.Query.dll \
-r:../../src/FSpot.Utils.dll \
+ -r:../../src/FSpot.Platform.dll \
-r:../../src/Cms.dll \
-r:../../semweb/SemWeb.dll
Modified: trunk/Tests/src/ThumbnailGenerator.cs
==============================================================================
--- trunk/Tests/src/ThumbnailGenerator.cs (original)
+++ trunk/Tests/src/ThumbnailGenerator.cs Wed Jan 7 15:10:02 2009
@@ -4,6 +4,7 @@
using System.IO;
using FSpot.Utils;
+using FSpot.Platform;
namespace FSpot.Tests
{
@@ -77,20 +78,20 @@
public void StringNames (string name)
{
string path = CreateFile (name, 1024);
- string thumb_path = ThumbnailGenerator.ThumbnailPath (path);
+ Uri fileuri = UriUtils.PathToFileUri (path);
+ //string thumb_path = ThumbnailFactory.PathForUri.ThumbnailPath (UriUtils.PathToFileUri(path));
- ThumbnailGenerator.Create (path);
- Assert.IsTrue (File.Exists (thumb_path), String.Format ("Missing: {0} created from {1}", thumb_path, path));
- using (Gdk.Pixbuf thumb = new Gdk.Pixbuf (thumb_path)) {
+ using (Gdk.Pixbuf thumb = ThumbnailGenerator.Create (fileuri)) {
+ Assert.IsTrue (ThumbnailFactory.ThumbnailExists (fileuri), String.Format ("Missing: thumbnail created from {0}", fileuri));
Assert.IsNotNull (thumb);
Assert.AreEqual (thumb.GetOption (ThumbnailGenerator.ThumbUri), UriUtils.PathToFileUriEscaped (path));
- Assert.AreEqual (new Uri (thumb.GetOption (ThumbnailGenerator.ThumbUri)), UriUtils.PathToFileUri (path));
- Assert.IsTrue (ThumbnailGenerator.ThumbnailIsValid (thumb, UriUtils.PathToFileUri (path)));
+ Assert.AreEqual (new Uri (thumb.GetOption (ThumbnailGenerator.ThumbUri)), fileuri);
+ Assert.IsTrue (ThumbnailFactory.ThumbnailIsValid (thumb, fileuri));
}
+ ThumbnailFactory.DeleteThumbnail (fileuri);
File.Delete (path);
- File.Delete (thumb_path);
}
[Test]
@@ -106,21 +107,21 @@
string path = CreateFile (name, 768);
Uri uri = new Uri (Gnome.Vfs.Uri.GetUriFromLocalPath (path));
- string string_path = ThumbnailGenerator.ThumbnailPath (path);
- string thumb_path = ThumbnailGenerator.ThumbnailPath (uri);
- Assert.AreEqual (thumb_path, string_path);
+// string string_path = ThumbnailGenerator.ThumbnailPath (path);
+// string thumb_path = ThumbnailGenerator.ThumbnailPath (uri);
+// Assert.AreEqual (thumb_path, string_path);
ThumbnailGenerator.Create (uri);
- Assert.IsTrue (File.Exists (thumb_path), String.Format ("Missing: {0} created from {1}", thumb_path, uri));
- using (Gdk.Pixbuf thumb = new Gdk.Pixbuf (thumb_path)) {
+ using (Gdk.Pixbuf thumb = ThumbnailGenerator.Create (uri)) {
+ Assert.IsTrue (ThumbnailFactory.ThumbnailExists (uri));
Assert.IsNotNull (thumb);
Assert.AreEqual (thumb.GetOption (ThumbnailGenerator.ThumbUri), UriUtils.UriToStringEscaped (uri));
Assert.AreEqual (new Uri (thumb.GetOption (ThumbnailGenerator.ThumbUri)), uri);
- Assert.IsTrue (ThumbnailGenerator.ThumbnailIsValid (thumb, uri));
+ Assert.IsTrue (ThumbnailFactory.ThumbnailIsValid (thumb, uri));
}
- File.Delete (thumb_path);
+ ThumbnailFactory.DeleteThumbnail (uri);
File.Delete (path);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]