running tests on mac via xcode

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

running tests on mac via xcode

Jim Newton
I'm developing on the Mac using xcode.
I can compile and run mscore just fine (apparently), but when I try to run the tests (mtest) it does not work.
The first curious thing that I see when I try to run a subset of the tests is the following:

********* Start testing of TestBiab *********
Config: Using QtTest library 5.4.0, Qt 5.4.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 6.0 (clang-600.0.54) (Apple))
QDEBUG : TestBiab::initTestCase() ChordList::read failed: </Users/jimka/MuseScore/build.xcode/mtest/biab/Resources/styles/chords_std.xml>

I've checked and the directory /Users/jimka/MuseScore/build.xcode/mtest/biab/Resources
does not exist.  Should it?

I've found two other directories of the same name.

bash-3.2$ pwd
/Users/jimka/MuseScore
bash-3.2$ find * -type d -name Resources -print
applebuild/mscore.app/Contents/Resources
build.xcode/mscore/Debug/mscore.app/Contents/Resources
bash-3.2$ find * -type f -name chords_std.xml -print
applebuild/mscore.app/Contents/Resources/styles/chords_std.xml
build.xcode/mscore/Debug/mscore.app/Contents/Resources/styles/chords_std.xml
build.xcode/mtest/libmscore/styles/chords_std.xml
build.xcode/mtest/styles/chords_std.xml
share/styles/chords_std.xml
bash-3.2$


I could of course just try to "copy -R applebuild/mscore.app/Contents/Resources /Users/jimka/MuseScore/build.xcode/mtest/biab"
but I'm wondering whether something more fundamental might be wrong???
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jim Newton
So, I created a symbolic link in the place of the Resources directory, and the first of these
errors goes away.  However, still 13 of 44 tests fail.
I'm running the test on the laster master: 7d70645725c9392309ee8d9684ad308f35da893d

Here is the error log that still occurs when I run the test.
https://www.dropbox.com/s/r7yn7ac5fp3yjus/mtest-errors.txt?dl=0
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

lasconic
Administrator
Because of small differences in the font rendering and layouting between Linux and Mac OSX, some tests cannot pass on Mac.
The ones that interest you should work though, meaning tst_midi, since they do not deal with layouting. 
Even in tst_midi, your code should probably only break the "mordents" test but not the others.

lasconic

2015-04-24 12:06 GMT+02:00 Jim Newton <[hidden email]>:
So, I created a symbolic link in the place of the Resources directory, and
the first of these
errors goes away.  However, still 13 of 44 tests fail.
I'm running the test on the laster master:
7d70645725c9392309ee8d9684ad308f35da893d

Here is the error log that still occurs when I run the test.
https://www.dropbox.com/s/r7yn7ac5fp3yjus/mtest-errors.txt?dl=0



--
View this message in context: http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p7579200.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
ABL
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

ABL
As lasconic said, some of the additional "<System>" could be caused by different font rendering.
Other errors related to the position of chords could be due to the fact that there are "ChordList::read failed" errors also for the other folders.
You can also see the failure in the mordents test from the Travis log:
https://travis-ci.org/musescore/MuseScore/builds/59844175#L4229

By the way, I see failures in the tests under Linux Mint 17.1, gcc 5.1, Qt 5.4.1, in the "bracket" field: I am obtaining type="255" instead of type="-1" for some of the libmscore folder tests. I am still investigating why.

Ciao,
ABL
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jim Newton
In reply to this post by lasconic
OK, great test_midi passes on master for me.
This will get me moving in the right direction.
Thanks.
ABL
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

ABL
In reply to this post by ABL
I nailed the problem I am facing with the tests to line 485 of staff.cpp:
xml.tagE("bracket type=\"%d\" span=\"%d\"", i._bracket, i._bracketSpan);
it is giving the wrong result when casting the BracketType i._bracket to integer.
I am not receiving warning from the compiler, but if I use a qDebug to show this QString the compiler issues a warning about the casting from the enum class type into int.
Is this a bug?
(Here my weak knowledge of c++ shows its strength)

...Sorry for the off-topic.

Ciao,
ABL
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jim Newton
I also don't understand the C++ concept of casting.  Of course I have a very high level conceptual understanding.  But the whole system seems to get confusing at the extremes.  I.e., if there are many different methods none of which exactly match, and lots of ways to auto-cast the arguments.  Which one has priority, and do we know whether this decision happens the same way on every version of every compiler on every architecture, independent of in which order the files were compiled etc.

I am very new to C++.  I'm using xcode on the mac.  When I compile musescore, it compiles with no errors, but nevertheless with lots of warnings.   I'm afraid to fix any of the warnings because they are in code I don't understand.  It would be great if we (the collective developers) could eliminate all the warnings.  Not sure if that is even possible, as perhaps some of the warnings are just plain wrong?  Not sure.



Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jojo-Schmitz
Hi Jim

What you call auto-casting, is really called default argument promotion. So
an function/method expecting a double would happily accept a float, a
function/method expecting a long would also take an int or short, and
without the need on any explicit cast. And this isn't even C++, but plain C.

Casts in C++ come in different flavours, see e.g.
http://stackoverflow.com/questions/28002/regular-cast-vs-static-cast-vs-dyna
mic-cast

I'm continuously trying to make sure the code compiles without any warning
under Windows (as seen on my machine) as well as Linux (as seen on Travis),
and also occasionally did some work to fix some warnings in Mac (I usually
don't get to see those), but the vast majority of warnings in Mac are just
bogus, at least to my understanding.
Would be really nice to somehow get them fixed or silenced, as to not miss
tree the tree (of a valid warning) in the forest (of bogus ones)...

Bye, Jojo

-----Original Message-----
From: Jim Newton [mailto:[hidden email]]
Sent: Saturday, April 25, 2015 11:33 AM
To: [hidden email]
Subject: Re: [Mscore-developer] running tests on mac via xcode

I also don't understand the C++ concept of casting.  Of course I have a very
high level conceptual understanding.  But the whole system seems to get
confusing at the extremes.  I.e., if there are many different methods none
of which exactly match, and lots of ways to auto-cast the arguments.  Which
one has priority, and do we know whether this decision happens the same way
on every version of every compiler on every architecture, independent of in
which order the files were compiled etc.

I am very new to C++.  I'm using xcode on the mac.  When I compile
musescore, it compiles with no errors, but nevertheless with lots of
warnings.   I'm afraid to fix any of the warnings because they are in code I
don't understand.  It would be great if we (the collective developers) could
eliminate all the warnings.  Not sure if that is even possible, as perhaps
some of the warnings are just plain wrong?  Not sure.







--
View this message in context:
http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p75792
09.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications Performance
metrics, stats and reports that give you Actionable Insights Deep dive
visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jojo-Schmitz
In reply to this post by ABL
The compiler can't warn here, as tagE() is a varadic function, so default
argument promotion should take place, which should implicitly cast that enum
(which is a signed char actually) into an int, and the %d expects an int
anyway?
What wrong results are you getting? You should get a number between -1
(NO_BRACKET)  and 3 (LINE), see mscore.h, line 145.
Would using %c instead of the 1st %d in the format string help? Or %hh,
maybe?

-----Original Message-----
From: ABL [mailto:[hidden email]]
Sent: Friday, April 24, 2015 6:10 PM
To: [hidden email]
Subject: Re: [Mscore-developer] running tests on mac via xcode

I nailed the problem I am facing with the tests to line 485 of staff.cpp:
xml.tagE("bracket type=\"%d\" span=\"%d\"", i._bracket, i._bracketSpan); it
is giving the wrong result when casting the BracketType i._bracket to
integer.
I am not receiving warning from the compiler, but if I use a qDebug to show
this QString the compiler issues a warning about the casting from the enum
class type into int.
Is this a bug?
(Here my weak knowledge of c++ shows its strength)

...Sorry for the off-topic.

Ciao,
ABL



--
View this message in context:
http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p75792
07.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications Performance
metrics, stats and reports that give you Actionable Insights Deep dive
visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Robert Patterson
I am a lurker on this list, and I have not tried to compile MuseScore on Mac in four or five years. But I will mention that in XCode a lot of the warnings can be turned off. Recent versions of XCode have more warnings. Without knowing what the warnings are I can't suggest specific steps. But there are for sure options to turn off deprecated function warnings and incomplete switch statement warnings, which are two that I have encountered a lot on other projects.


On Sat, Apr 25, 2015 at 7:27 AM, Joachim Schmitz <[hidden email]> wrote:
The compiler can't warn here, as tagE() is a varadic function, so default
argument promotion should take place, which should implicitly cast that enum
(which is a signed char actually) into an int, and the %d expects an int
anyway?
What wrong results are you getting? You should get a number between -1
(NO_BRACKET)  and 3 (LINE), see mscore.h, line 145.
Would using %c instead of the 1st %d in the format string help? Or %hh,
maybe?

-----Original Message-----
From: ABL [mailto:[hidden email]]
Sent: Friday, April 24, 2015 6:10 PM
To: [hidden email]
Subject: Re: [Mscore-developer] running tests on mac via xcode

I nailed the problem I am facing with the tests to line 485 of staff.cpp:
xml.tagE("bracket type=\"%d\" span=\"%d\"", i._bracket, i._bracketSpan); it
is giving the wrong result when casting the BracketType i._bracket to
integer.
I am not receiving warning from the compiler, but if I use a qDebug to show
this QString the compiler issues a warning about the casting from the enum
class type into int.
Is this a bug?
(Here my weak knowledge of c++ shows its strength)

...Sorry for the off-topic.

Ciao,
ABL



--
View this message in context:
http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p75792
07.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications Performance
metrics, stats and reports that give you Actionable Insights Deep dive
visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
ABL
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

ABL
In reply to this post by Jojo-Schmitz
@Jojo-Schmitz:
Well, I am getting 255 instead of -1.
I obtain -1 if I explicitely cast i._bracket to int.
I ran the tests before and I couldn't see this problem, so I think it started when I installed gcc 5.0.
At the moment I can't verify your other suggestions, but I will try and see if the result gets right.
Thank you.

Ciao,
ABL
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jojo-Schmitz
In reply to this post by Robert Patterson

As far as I remember the bogus warnings are about something different

 

From: Robert Patterson [mailto:[hidden email]]
Sent: Saturday, April 25, 2015 2:44 PM
To: [hidden email]
Subject: Re: [Mscore-developer] running tests on mac via xcode

 

I am a lurker on this list, and I have not tried to compile MuseScore on Mac in four or five years. But I will mention that in XCode a lot of the warnings can be turned off. Recent versions of XCode have more warnings. Without knowing what the warnings are I can't suggest specific steps. But there are for sure options to turn off deprecated function warnings and incomplete switch statement warnings, which are two that I have encountered a lot on other projects.

 


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jojo-Schmitz
In reply to this post by ABL
Hmm, so it doesn't properly deal with that being a signed char and makes it
unsigned.
Have you tried my other suggestions, like using "%hh"?
Or  cast it to signed char?

-----Original Message-----
From: ABL [mailto:[hidden email]]
Sent: Saturday, April 25, 2015 6:34 PM
To: [hidden email]
Subject: Re: [Mscore-developer] running tests on mac via xcode

@Jojo-Schmitz:
Well, I am getting 255 instead of -1.
I obtain -1 if I explicitely cast i._bracket to int.
I ran the tests before and I couldn't see this problem, so I think it
started when I installed gcc 5.0.
At the moment I can't verify your other suggestions, but I will try and see
if the result gets right.
Thank you.

Ciao,
ABL


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jim Newton
In reply to this post by Jojo-Schmitz
Hi Jojo,  I’m trying to figure out how to dump the warnings from xcode where I can post them to you.  It will take me some
time to figure this out.


On the other hand, the other topic about casts making things confusing.  I think there are probably lots of subtle implications of these automatic casts in C++ which programmers don’t realize.  I know that some times cast automatically like you mentioned with certain numeric types.  But I also understand that the programmer can overload casting operations between his own types.  In addition the programmer can create template multiple argument functions which the compiler promises to use if the function gets called with particular combinations of types.   It should be pretty easy to set up multiple ways to describe the casting.  E.g., if there are overloaded casting operators transforming A->X, A->Y, X->B and Y->B, and there is a template defined on B and you call the template with A, I don’t know what will happen.  Maybe this case is specified and everyone understands it.  But certainly when you mix in multiple inheritance and functions of multiple arguments and lots of casting overloading, it will become difficult for the human being to figure out what is going to happen.  And my suspicion is that not all compilers will handle some situations the same way.

One thing that makes C++ powerful as it is used today, is that libraries set up so many intuitive operator overloadings and generic templates, that the naive beginner such as myself can easily write code which compiles and works or at least seems to work, but might be horribly inefficient or might fail under obscure conditions.  I’ve noticed that somethings just work, and other things which should work (in my opinion) don’t.

The case I found recently was that if I declare a variable as a set of objects of my class.  I can call container.find(obj).  but if I redefine to use deque rather than set, container.find(obj) fails, and on the mac it fails with a strange compiler error.  I talked to a C++ expert about this and in his opinion it was obvious, but to me it just seemed inconsistent and strange.


Jim


On 25 Apr 2015, at 14:20, Jojo-Schmitz [via MuseScore Developer] <[hidden email]> wrote:

Hi Jim

What you call auto-casting, is really called default argument promotion. So
an function/method expecting a double would happily accept a float, a
function/method expecting a long would also take an int or short, and
without the need on any explicit cast. And this isn't even C++, but plain C.

Casts in C++ come in different flavours, see e.g.
http://stackoverflow.com/questions/28002/regular-cast-vs-static-cast-vs-dyna
mic-cast

I'm continuously trying to make sure the code compiles without any warning
under Windows (as seen on my machine) as well as Linux (as seen on Travis),
and also occasionally did some work to fix some warnings in Mac (I usually
don't get to see those), but the vast majority of warnings in Mac are just
bogus, at least to my understanding.
Would be really nice to somehow get them fixed or silenced, as to not miss
tree the tree (of a valid warning) in the forest (of bogus ones)...

Bye, Jojo

-----Original Message-----
From: Jim Newton [mailto:<a href="x-msg://14/user/SendEmail.jtp?type=node&amp;node=7579210&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]]
Sent: Saturday, April 25, 2015 11:33 AM
To: <a href="x-msg://14/user/SendEmail.jtp?type=node&amp;node=7579210&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]
Subject: Re: [Mscore-developer] running tests on mac via xcode

I also don't understand the C++ concept of casting.  Of course I have a very
high level conceptual understanding.  But the whole system seems to get
confusing at the extremes.  I.e., if there are many different methods none
of which exactly match, and lots of ways to auto-cast the arguments.  Which
one has priority, and do we know whether this decision happens the same way
on every version of every compiler on every architecture, independent of in
which order the files were compiled etc.

I am very new to C++.  I'm using xcode on the mac.  When I compile
musescore, it compiles with no errors, but nevertheless with lots of
warnings.   I'm afraid to fix any of the warnings because they are in code I
don't understand.  It would be great if we (the collective developers) could
eliminate all the warnings.  Not sure if that is even possible, as perhaps
some of the warnings are just plain wrong?  Not sure.







--
View this message in context:
http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p75792
09.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications Performance
metrics, stats and reports that give you Actionable Insights Deep dive
visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
<a href="x-msg://14/user/SendEmail.jtp?type=node&amp;node=7579210&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
<a href="x-msg://14/user/SendEmail.jtp?type=node&amp;node=7579210&amp;i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer



If you reply to this email, your message will be added to the discussion below:
http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p7579210.html
To unsubscribe from running tests on mac via xcode, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Robert Patterson
C++ is very confusing at first, and I have found the errors are often stubbornly unhelpful until you gain some experience with them.

I am not convinced that automatic casting is as risky as you think it is. In my experience, C++ compilers do a very good job at balking if they encounter any ambiguity whatsoever. That said, the error messages sometimes don't help much. (See the previous paragraph.)


On Sun, Apr 26, 2015 at 6:15 AM, Jim Newton <[hidden email]> wrote:
Hi Jojo,  I’m trying to figure out how to dump the warnings from xcode where I can post them to you.  It will take me some
time to figure this out.


On the other hand, the other topic about casts making things confusing.  I think there are probably lots of subtle implications of these automatic casts in C++ which programmers don’t realize.  I know that some times cast automatically like you mentioned with certain numeric types.  But I also understand that the programmer can overload casting operations between his own types.  In addition the programmer can create template multiple argument functions which the compiler promises to use if the function gets called with particular combinations of types.   It should be pretty easy to set up multiple ways to describe the casting.  E.g., if there are overloaded casting operators transforming A->X, A->Y, X->B and Y->B, and there is a template defined on B and you call the template with A, I don’t know what will happen.  Maybe this case is specified and everyone understands it.  But certainly when you mix in multiple inheritance and functions of multiple arguments and lots of casting overloading, it will become difficult for the human being to figure out what is going to happen.  And my suspicion is that not all compilers will handle some situations the same way.

One thing that makes C++ powerful as it is used today, is that libraries set up so many intuitive operator overloadings and generic templates, that the naive beginner such as myself can easily write code which compiles and works or at least seems to work, but might be horribly inefficient or might fail under obscure conditions.  I’ve noticed that somethings just work, and other things which should work (in my opinion) don’t.

The case I found recently was that if I declare a variable as a set of objects of my class.  I can call container.find(obj).  but if I redefine to use deque rather than set, container.find(obj) fails, and on the mac it fails with a strange compiler error.  I talked to a C++ expert about this and in his opinion it was obvious, but to me it just seemed inconsistent and strange.


Jim


> On 25 Apr 2015, at 14:20, Jojo-Schmitz [via MuseScore Developer] <[hidden email]> wrote:
>
> Hi Jim
>
> What you call auto-casting, is really called default argument promotion. So
> an function/method expecting a double would happily accept a float, a
> function/method expecting a long would also take an int or short, and
> without the need on any explicit cast. And this isn't even C++, but plain C.
>
> Casts in C++ come in different flavours, see e.g.
> http://stackoverflow.com/questions/28002/regular-cast-vs-static-cast-vs-dyna <http://stackoverflow.com/questions/28002/regular-cast-vs-static-cast-vs-dyna>
> mic-cast
>
> I'm continuously trying to make sure the code compiles without any warning
> under Windows (as seen on my machine) as well as Linux (as seen on Travis),
> and also occasionally did some work to fix some warnings in Mac (I usually
> don't get to see those), but the vast majority of warnings in Mac are just
> bogus, at least to my understanding.
> Would be really nice to somehow get them fixed or silenced, as to not miss
> tree the tree (of a valid warning) in the forest (of bogus ones)...
>
> Bye, Jojo
>
> -----Original Message-----
> From: Jim Newton [mailto:[hidden email] <x-msg://14/user/SendEmail.jtp?type=node&node=7579210&i=0>]
> Sent: Saturday, April 25, 2015 11:33 AM
> To: [hidden email] <x-msg://14/user/SendEmail.jtp?type=node&node=7579210&i=1>
> Subject: Re: [Mscore-developer] running tests on mac via xcode
>
> I also don't understand the C++ concept of casting.  Of course I have a very
> high level conceptual understanding.  But the whole system seems to get
> confusing at the extremes.  I.e., if there are many different methods none
> of which exactly match, and lots of ways to auto-cast the arguments.  Which
> one has priority, and do we know whether this decision happens the same way
> on every version of every compiler on every architecture, independent of in
> which order the files were compiled etc.
>
> I am very new to C++.  I'm using xcode on the mac.  When I compile
> musescore, it compiles with no errors, but nevertheless with lots of
> warnings.   I'm afraid to fix any of the warnings because they are in code I
> don't understand.  It would be great if we (the collective developers) could
> eliminate all the warnings.  Not sure if that is even possible, as perhaps
> some of the warnings are just plain wrong?  Not sure.
>
>
>
>
>
>
>
> --
> View this message in context:
> http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p75792 <http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p75792>
> 09.html
> Sent from the MuseScore Developer mailing list archive at Nabble.com.
>
> ----------------------------------------------------------------------------
> --
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications Performance
> metrics, stats and reports that give you Actionable Insights Deep dive
> visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
> _______________________________________________
> Mscore-developer mailing list
> [hidden email] <x-msg://14/user/SendEmail.jtp?type=node&node=7579210&i=2>
> https://lists.sourceforge.net/lists/listinfo/mscore-developer <https://lists.sourceforge.net/lists/listinfo/mscore-developer>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
> _______________________________________________
> Mscore-developer mailing list
> [hidden email] <x-msg://14/user/SendEmail.jtp?type=node&node=7579210&i=3>
> https://lists.sourceforge.net/lists/listinfo/mscore-developer <https://lists.sourceforge.net/lists/listinfo/mscore-developer>
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p7579210.html <http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p7579210.html>
> To unsubscribe from running tests on mac via xcode, click here < > NAML <http://dev-list.musescore.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p7579217.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
ABL
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

ABL
In reply to this post by Jojo-Schmitz
@Jojo-Schmitz :
Yes, using %hhd instead of %d returns the expected -1 instead of 255.
%c gives strange results.

Ciao,
ABL
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jim Newton
this is one of the thing that compiling on my mac complains about.  but I didn’t know what %hhd means.

On 26 Apr 2015, at 16:11, ABL [via MuseScore Developer] <[hidden email]> wrote:

@Jojo-Schmitz :
Yes, using %hhd instead of %d returns the expected -1 instead of 255.
%c gives strange results.

Ciao,
ABL


If you reply to this email, your message will be added to the discussion below:
http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p7579219.html
To unsubscribe from running tests on mac via xcode, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jojo-Schmitz
In reply to this post by ABL
Hi ABL

You are submitting a PR for that?

Bye, Jojo

-----Original Message-----
From: ABL [mailto:[hidden email]]
Sent: Sunday, April 26, 2015 4:11 PM
To: [hidden email]
Subject: Re: [Mscore-developer] running tests on mac via xcode

@Jojo-Schmitz :
Yes, using %hhd instead of %d returns the expected -1 instead of 255.
%c gives strange results.

Ciao,
ABL


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jojo-Schmitz
In reply to this post by ABL
Could you try whether this works as expected?

xml.tagE(QString("bracket type=\"%1\"
span=\"%2\"").arg(i._bracket).arg(i._bracketSpan));

This is the syntax used almost anywhere else in MuseScore

-----Original Message-----
From: Joachim Schmitz [mailto:[hidden email]]
Sent: Sunday, April 26, 2015 5:38 PM
To: '[hidden email]'
Subject: RE: [Mscore-developer] running tests on mac via xcode

Hi ABL

You are submitting a PR for that?

Bye, Jojo

-----Original Message-----
From: ABL [mailto:[hidden email]]
Sent: Sunday, April 26, 2015 4:11 PM
To: [hidden email]
Subject: Re: [Mscore-developer] running tests on mac via xcode

@Jojo-Schmitz :
Yes, using %hhd instead of %d returns the expected -1 instead of 255.
%c gives strange results.

Ciao,
ABL


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: running tests on mac via xcode

Jojo-Schmitz
In reply to this post by ABL
Doing so actually reveals the problem, it just doesn't compile that way at
all, hinting at not having found a suitable finction to match that type
It does compile when changing to
xml.tagE(QString("bracket type=\"%1\" span=\"%2\"").arg((signed
char)(i._bracket)).arg(i._bracketSpan));
Deas that then show the correct result for you?

While looking at these I found a related bug...
In groups.cpp, line 180 it uses
xml.tagE(QString("Node pos=\"%1\" action=\"%3\"")
.arg(n.pos).arg(n.action));
rather than
xml.tagE(QString("Node pos=\"%1\" action=\"%2\"")
.arg(n.pos).arg(n.action));

And there are quite a few 'printf' style usages in exportxmp.cpp.

Guess I'll do a PR for all this, but would first want to hear whether the
top change fixes your issue on Mac

Bye, Jojo

-----Original Message-----
From: Joachim Schmitz [mailto:[hidden email]]
Sent: Sunday, April 26, 2015 5:48 PM
To: '[hidden email]'
Subject: RE: [Mscore-developer] running tests on mac via xcode

Could you try whether this works as expected?

xml.tagE(QString("bracket type=\"%1\"
span=\"%2\"").arg(i._bracket).arg(i._bracketSpan));

This is the syntax used almost anywhere else in MuseScore

-----Original Message-----
From: Joachim Schmitz [mailto:[hidden email]]
Sent: Sunday, April 26, 2015 5:38 PM
To: '[hidden email]'
Subject: RE: [Mscore-developer] running tests on mac via xcode

Hi ABL

You are submitting a PR for that?

Bye, Jojo

-----Original Message-----
From: ABL [mailto:[hidden email]]
Sent: Sunday, April 26, 2015 4:11 PM
To: [hidden email]
Subject: Re: [Mscore-developer] running tests on mac via xcode

@Jojo-Schmitz :
Yes, using %hhd instead of %d returns the expected -1 instead of 255.
%c gives strange results.

Ciao,
ABL


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
12