Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue 969 and issue 986 #990

Merged
merged 5 commits into from Feb 4, 2017
Merged

Commits on Feb 1, 2017

  1. -Modified class_MethodDeclaration.ump so that a Java method with no r…

    …eturn type that is not a constructor returns "void" in the generated output. This fixes issue 969
    
    -Modified SampleFileWriter_Code.ump so that expected and actual output is compared properly during assertUmpleTemplateFor(). This fixes issue 984, but is included in this commit because the fix is also necessary to fix issue 969 as the two issues share many test cases (JUnit can't be green for either issue unless they are both fixed).
    AdamBJ committed Feb 1, 2017
    Configuration menu
    Copy the full SHA
    65dec02 View commit details
    Browse the repository at this point in the history
  2. -Reverted SampleFileWriter_Code.ump in order to focus exclusively on …

    …issue 969 (984 and 969 don't need to be worked on together after all).
    AdamBJ committed Feb 1, 2017
    Configuration menu
    Copy the full SHA
    061208f View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2017

  1. This commit makes several changes to ensure that main methods (in the…

    … Java sense of the term) are correctly generated by Umple.
    
    - Removed the "is this a main method check" from UmpleInternalParser_CodeClass.ump. Since what it means to have a "main function" varies from language to language (e.g. compare Java where the main method is the main entry point into a program and PhP where it's just another method) this check should be done and the results processed during code generation.
    - Changed the "is this a main method check" in class_MethodDeclaration.ump to include a check for "void" and "String[] args"
    - Added several new test cases to verify the main check and subsequent code generation is behaving correctly
    - Added a "tearDown" method to DistributedClassTest.java that cleans up the mainMainClass static variable before moving to the next test set. Without the tearDown method the state from DistributedClassTest.java was being carried over to JavaClassTemplateTest.java, which was causing intermittent code generation issues.
    AdamBJ committed Feb 4, 2017
    Configuration menu
    Copy the full SHA
    e17650e View commit details
    Browse the repository at this point in the history
  2. Adding additional tests the makes sure an extra "void" isn't added if…

    … the user explicitly includes "void" in the .ump file.
    AdamBJ committed Feb 4, 2017
    Configuration menu
    Copy the full SHA
    dc79d18 View commit details
    Browse the repository at this point in the history
  3. Fixed ClassTemplateTest_Generated3.java.txt and ClassTemplateTest_Gen…

    …erated3.ump (it was identical to ClassTemplateTest_Generated2.java.txt and ClassTemplateTest_Generated2.ump
    AdamBJ committed Feb 4, 2017
    Configuration menu
    Copy the full SHA
    378b5bc View commit details
    Browse the repository at this point in the history