Unit tests
John Ralls
jralls at ceridwen.us
Sun Mar 13 12:11:02 EDT 2016
> On Mar 13, 2016, at 7:33 AM, Robert Fewell <14ubobit at gmail.com> wrote:
>
> Hi,
>
> While updating the import-map tests to reflect the changes to use guid's, I
> came across the following, just wondering if it is my set-up.
>
> Firstly I had to change configure.ac at line 850 and 856 to add a directory
> src to the paths
>
> [AC_CHECK_FILES([/usr/src/gmock/gmock-all.cc
>
> to [AC_CHECK_FILES([/usr/src/gmock/src/gmock-all.cc
>
> /usr/src/gtest/gtest-main.cc
>
> to /usr/src/gtest/src/gtest-main.cc
>
Don't do that. Configure is set up to find the path on Debian/Ubuntu and Fedora. Users of other distros should use the --with-gtest* and --with-gmock* configure arguments to set the paths.
>
> test-kvp-frame.cpp line 153, comparison between signed and unsigned integer
> expressions
>
> EXPECT_EQ (keys.size (), 1);
>
> to EXPECT_EQ ((int)keys.size (), 1);
Don't use C-style casts in C++, and anyway it's better to make the constant unsigned:
EXPECT_EQ (keys.size), 1U);
>
> these changes allowed me to run the tests and update the engine import-map
> tests but they fail later on at, all seem to be the same error
>
> PASS: test-vendor
> FAIL: test-test-extras
> FAIL: test-account
> FAIL: test-split
> PASS: test-lots
>
> the log for test-test-extras is below...
>
> Backtrace:
> In unknown file:
> ?: 0* [primitive-load "./test-test-extras.scm"]
> In ./test-test-extras.scm:
> 23: 1* (use-modules (gnucash engine test test-extras))
> 23: 2 (eval-case (# # *unspecified*) (else #))
> 23: 3 (begin (process-use-modules (list (list #))) *unspecified*)
> In unknown file:
> ?: 4* [process-use-modules (((gnucash engine test test-extras)))]
> ?: 5 (let* ((interfaces #)) (call-with-deferred-observers (lambda ()
> #)))
> ?: 6* [map #<procedure #f (mif-args)> (((gnucash engine test
> test-extras)))]
> ?: 7* [#<procedure #f (mif-args)> ((gnucash engine test test-extras))]
> ?: 8* (or (apply resolve-interface mif-args) (error "no such module"
> mif-args))
> ?: 9* [apply #<procedure resolve-interface (name . args)> (#)]
> ?: 10 [resolve-interface (gnucash engine test test-extras)]
> ...
> ?: 11 (let* (# # # # ...) (and # #) (if # public-i #))
> ?: 12* (and (or (not module) (not public-i)) (error "no code for module"
> name))
> ?: 13 [error "no code for module" (gnucash engine test test-extras)]
> ...
> ?: 14 [scm-error misc-error #f ...]
>
> <unnamed port>: In procedure scm-error in expression (scm-error (quote
> misc-error) #f ...):
> <unnamed port>: no code for module (gnucash engine test test-extras)
> FAIL test-test-extras (exit status: 1)
That's a scheme stack trace. It's telling you that ltdl couldn't find a library. If ~/.cache/guile/ccache exists, nuke it and try again.
Regards,
John Ralls
More information about the gnucash-devel
mailing list