[Pkg-octave-commit] [SCM] octave-msh branch, master, updated. d2e4c0b1edd268f6bce94e8007e9fe114bf89964

Thomas Weber thomas.weber.mail at gmail.com
Thu Dec 31 09:26:32 UTC 2009


The following commit has been merged in the master branch:
commit 392ee1cff8d7801d46e4a734e1fb3c56696e99c0
Author: Thomas Weber <thomas.weber.mail at gmail.com>
Date:   Tue Dec 29 23:11:59 2009 +0100

    New patch: fix_tests_for_MSH2Mgmsh

diff --git a/debian/changelog b/debian/changelog
index c022e50..2c8c612 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ octave-msh (0.1.1-2) UNRELEASED; urgency=low
 
   * Upload to unstable. 
   * Clean up debian/rules.
+  * New patch: fix_tests_for_MSH2Mgmsh, fixes unit test problems. Taken from
+    upstream SVN.
  
  -- Thomas Weber <thomas.weber.mail at gmail.com>  Mon, 07 Dec 2009 22:44:05 +0100
 
diff --git a/debian/patches/fix_tests_for_MSH2Mgmsh b/debian/patches/fix_tests_for_MSH2Mgmsh
new file mode 100644
index 0000000..9bb151f
--- /dev/null
+++ b/debian/patches/fix_tests_for_MSH2Mgmsh
@@ -0,0 +1,30 @@
+Fixes a problem with the unit tests. Taken from upstream SVN rev 6004 and rev 6461
+--- a/inst/MSH2Mgmsh.m
++++ b/inst/MSH2Mgmsh.m
+@@ -136,17 +136,16 @@
+ 
+ %!test
+ %! fid = fopen("circle.geo","w");
+-%! fprintf(fid,"Point(1) = {0, 0, 0, 1e+22};\n");
+-%! fprintf(fid,"Point(2) = {1, 0, 0, 1e+22};\n");
+-%! fprintf(fid,"Point(3) = {-1, 0, 0, 1e+22};\n");
++%! fprintf(fid,"Point(1) = {0, 0, 0, 1};\n");
++%! fprintf(fid,"Point(2) = {1, 0, 0, 1};\n");
++%! fprintf(fid,"Point(3) = {-1, 0, 0, 1};\n");
+ %! fprintf(fid,"Circle(1) = {3, 1, 2};\n");
+ %! fprintf(fid,"Circle(2) = {2, 1, 3};\n");
+ %! fprintf(fid,"Line Loop(4) = {2, 1};\n");
+ %! fprintf(fid,"Plane Surface(4) = {4};");
+ %! fclose(fid);
+-%! mesh = msh2m_gmsh("circle","v",0);
++%! mesh = MSH2Mgmsh("circle","v",0);
+ %! system("rm circle.geo");
+-%! xidx = find(mesh.p(1,:) == 0);
+-%! yidx = find(mesh.p(2,:) == 0);
+-%! tmp  = intersect(xidx,yidx);
+-%! assert(isempty(tmp));
+\ No newline at end of file
++%! nnodest = length(unique(mesh.t));
++%! nnodesp = columns(mesh.p);
++%! assert(nnodest,nnodesp);
+\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
index 6f889c5..4255790 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+fix_tests_for_MSH2Mgmsh
 autoload-yes.diff

-- 
octave-msh



More information about the Pkg-octave-commit mailing list