To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=86525
                 Issue #|86525
                 Summary|In-tree, Unit-testing ...
               Component|utilities
                 Version|680m248
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|fs
             Reported by|mmeeks





------- Additional comments from [EMAIL PROTECTED] Wed Feb 27 17:03:49 +0000 
2008 -------
Hi guys,

I attach our unit testing work; the punch-line is that, during the build you can
execute things like:

+void Test::createDocument()
+{
+    ScDocument *doc = createSimpleDoc();
+    
+    double val = 1;
+    doc->SetValue (0, 0, 0, val);
+    doc->SetValue (0, 1, 0, val);
+    doc->SetString (0, 2, 0, rtl::OUString::createFromAscii ("=SUM(A1:A2)"));
+    doc->CalcAll();
+    double result;
+    doc->GetValue (0, 2, 0, result);
+    fprintf (stderr, "one plus one = %g\n", result);
+    CPPUNIT_ASSERT_MESSAGE ("calculation failed", result == 2.0);
+                    
+    delete doc;
+}

without having to have a live install.

Of course - there are several problems / issues needing input / advice:

  * we need regcomp earlier, eg. for 'stoc' to register it's components. That
means we need to fiddle with cpputools, pushing it down and even into (?)
cppuhelper (eg.) ? Failing that we need to add more build.lst dependencies.
Currently we miss critical unit-<module>.rdb files in the solver because of 
this.
     * [ as an aside we create one unit-*.rdb file per module to avoid races
         and collate them before running the test ].

  * we need input from the comphelper owner: is it ok to whack a somewhat
esoteric 'Setup.xcu' file and 'configmgrrc' in your module - and this new
libunitbootstrap library ?

  * we need testing on Win32 - sad but true, I can't easily build / run there,
and there are bound to be odd bootstrapping / URL type issues around the place.

  * there is some ugly cut/paste of the perl goodness from the installer to get
the regcomp calls doing what is expected of them: ideally a little re-factoring
advice from a build-engineer would be good.

Anyhow - if we can fix the first issue, this can be made a conditional
compilation option on Unix, and at least get the infrastructure into CVS; but
assistance from Sun much appreciated here.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to