Skip to content

Add Basic Color Test for RGB#543

Merged
Danielku15 merged 2 commits into
CoderLine:developfrom
kyledecot:kd-color
Feb 24, 2021
Merged

Add Basic Color Test for RGB#543
Danielku15 merged 2 commits into
CoderLine:developfrom
kyledecot:kd-color

Conversation

@kyledecot
Copy link
Copy Markdown
Contributor

@kyledecot kyledecot commented Feb 11, 2021

Issues

Fixes #387

Proposed changes

Updates the substring logic in Color.ts to properly grab the RGB values. Without this change numbers ends up being an array w/ a single item in it with eventually causes the method to return null.

Screen Shot 2021-02-11 at 8 05 22 AM

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • Existing builds tests pass
  • New tests were added

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

@kyledecot kyledecot force-pushed the kd-color branch 3 times, most recently from 31e78a7 to 13d289b Compare February 11, 2021 13:09
@kyledecot
Copy link
Copy Markdown
Contributor Author

I might need some guidance here @Danielku15 – I'm not sure how these C# tests are generated / what I'm doing incorrectly.

@Danielku15
Copy link
Copy Markdown
Member

Danielku15 commented Feb 19, 2021

Hi there.
You can usually just run locally the build-csharp NPM script to generate the C# sources and compile them: https://alphatab.net/docs/contributing#npm-scripts

This way you get the same error locally and can inspect the C# code. You will notice that the test method is having a space which is not supported for C#:

image

You will notice that all test names within alphaTab are following the kebab-case naming convention. This way you can fix the test. Either you simply adapt the test name, or you dare to touch the C# transpiler to add support for spaces 😉

name: this._context.toPascalCase((d.arguments[0] as ts.StringLiteral).text),

@kyledecot
Copy link
Copy Markdown
Contributor Author

Ah–okay. Thanks for the explanation. This should be fixed in bb1e130

@Danielku15 Danielku15 merged commit 56d4550 into CoderLine:develop Feb 24, 2021
@Danielku15
Copy link
Copy Markdown
Member

Thanks for the contribution. Merged the changes 👍

@kyledecot kyledecot deleted the kd-color branch February 24, 2021 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsupported format for color

2 participants