Normalized C and Java definition of isDimDefined. #59

Merged
freakboy3742 merged 1 commits from normalize_isDimDefined into master 2015-03-22 09:08:53 -07:00
freakboy3742 commented 2015-03-21 23:43:14 -07:00 (Migrated from github.com)

The JavaScript implementation of isDimDefined contains a check to ensure
that the dimension value is positive; the C and Java versions did not
have this check. As a result, a negative style value for 'width' (such
as that used by the "should layout node with negative width" test) would
have different layout under the C/Java implementation to the JavaScript
implementation.

This was hidden because the C/Java transpilers filtered out any negative
instantiation values from the test suite. In effect, the negative value
tests weren't running on the C/Java implementation.

This patch removes the negative value filter from the transpiler, and
makes the isDimDefined definition consistent between the three
implementations.

The JavaScript implementation of isDimDefined contains a check to ensure that the dimension value is positive; the C and Java versions did not have this check. As a result, a negative style value for 'width' (such as that used by the "should layout node with negative width" test) would have different layout under the C/Java implementation to the JavaScript implementation. This was hidden because the C/Java transpilers filtered out any negative instantiation values from the test suite. In effect, the negative value tests weren't running on the C/Java implementation. This patch removes the negative value filter from the transpiler, and makes the isDimDefined definition consistent between the three implementations.
vjeux commented 2015-03-22 09:09:03 -07:00 (Migrated from github.com)

Good catch! Thanks for sending this pull request :)

Good catch! Thanks for sending this pull request :)
Sign in to join this conversation.
No description provided.