unotest/source/embindtest/embindtest.cxx |    2 +-
 unotest/source/embindtest/embindtest.js  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 119696c73eb7a2f4187efea503ebb88a19105819
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Wed Mar 6 14:55:37 2024 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Wed Mar 6 20:50:01 2024 +0100

    Adapt Exception test to emcc/Clang versions that support 
std::source_location
    
    ...so that the Exception's Message is something like "error at
    unotest/source/embindtest/embindtest.cxx:271" instead of just plain "error"
    
    Change-Id: I3b236dc91cc75f859000a2283f04413fcbbd6b39
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164470
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 260c9883eb19..1f8b916fbbf1 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -279,7 +279,7 @@ class Test : public 
cppu::WeakImplHelper<org::libreoffice::embindtest::XTest>
             return false;
         }
         auto const& e = 
*o3tl::forceAccess<org::libreoffice::embindtest::Exception>(value);
-        return e.Message == "error" && !e.Context.is() && e.m1 == -123456 && 
e.m2 == 100.5
+        return e.Message.startsWith("error") && !e.Context.is() && e.m1 == 
-123456 && e.m2 == 100.5
                && e.m3 == u"hä";
     }
 
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 9b9911826219..c661589683f6 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -289,7 +289,7 @@ Module.addOnPostRun(function() {
     {
         let v = test.getAnyException();
         console.log(v);
-        console.assert(v.get().Message === 'error');
+        console.assert(v.get().Message.startsWith('error'));
         console.assert(v.get().Context === null);
         console.assert(v.get().m1 === -123456);
         console.assert(v.get().m2 === 100.5);

Reply via email to