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

Added Baklava in C++ #1252

Merged
merged 8 commits into from
Oct 14, 2019
Merged

Added Baklava in C++ #1252

merged 8 commits into from
Oct 14, 2019

Conversation

yottanami
Copy link
Contributor

@yottanami yottanami commented Oct 9, 2019

Complete the Applicable Sections Below

Find which section best describes your pull request and make sure you fill it out. To start, let us know which issue you've fixed.

Code Snippets

  • I named the pull request using Added/Updated <Sample Program> in <Language> format
  • I created/updated the language README
    • I added the sample program name to the README
    • I added fun facts (i.e. debut, developer, typing, etc.)
    • I added reference link(s) to the README
    • I added solution citations when necessary (see plagiarism)

Documentation

  • I named the pull request using Added/Updated <Sample Program> in <Language> Article format
  • I followed the applicable article template

Testing

  • I named the pull request using Added/Updated <Language>/<Project> Testing format
  • I followed the testinfo template, if applicable

Notes

Feel free to describe what you added or updated.

@jrg94 jrg94 requested a review from a team October 9, 2019 16:16
@jrg94 jrg94 self-assigned this Oct 9, 2019
@jrg94 jrg94 added baklava See: https://sampleprograms.io/projects/baklava/ enhancement Any code that improves the repo hacktoberfest Hacktoberfest related labels Oct 9, 2019
@jrg94 jrg94 modified the milestones: 200 Articles, 500 Code Snippets Oct 9, 2019
Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I took a peek at the test suite, and it looks like this solution fails with the following error:

__________________________ test_baklava[baklava.cpp] ___________________________
baklava = Source(name: baklava, path: /home/travis/build/TheRenegadeCoder/sample-programs/archive/c/c-plus-plus
    def test_baklava(baklava):
        expected = """          *
             ***
            *****
           *******
          *********
         ***********
        *************
       ***************
      *****************
     *******************
    *********************
     *******************
      *****************
       ***************
        *************
         ***********
          *********
           *******
            *****
             ***
              *
    """
        expected_lines = expected.split(os.linesep)
        actual = baklava.run()
        actual_lines = actual.split(os.linesep)
        for i in range(len(expected_lines)):
>           assert actual_lines[i] == expected_lines[i], f'line {i + 1} did not match'
E           AssertionError: line 1 did not match
E           assert 'sh: 1: pause: not found' == '          *'
E             - sh: 1: pause: not found
E             +           *
test/projects/test_baklava.py:45: AssertionError
================== 1 failed, 608 passed in 237.33s (0:03:57) ===================
The command "python -um samplerunner test" exited with 1.

Any chance you could look into this?

@yottanami
Copy link
Contributor Author

I just make it static to pass the test but I could not run the test.
Is there any chance to run the test locally?
because when I run pytest I got this error

requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

it seems it happens during connecting to docker

@jrg94
Copy link
Member

jrg94 commented Oct 12, 2019

That's a good question. Best for @auroq.

That said, you can always check the results in Travis CI: https://travis-ci.com/TheRenegadeCoder/sample-programs/jobs/244981574

It looks like there's one too many spaces in the first row.

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Works great.

@jrg94 jrg94 merged commit 68beff2 into TheRenegadeCoder:master Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
baklava See: https://sampleprograms.io/projects/baklava/ enhancement Any code that improves the repo hacktoberfest Hacktoberfest related
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add Baklava in C++
2 participants