Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

Test fixed size arrays #67

Merged
merged 4 commits into from
Apr 16, 2018
Merged

Conversation

ernestmc
Copy link
Member

@ernestmc ernestmc commented Apr 11, 2018

Adds unit test cases for fixed sized arrays with different data types.
Note that currently some tests are not passing and will be addressed in future pull requests like #59 which is pending review.

To run the tests:

./gradlew test

Here's a snapshot of the current status of the tests:

image

@ernestmc ernestmc requested a review from jubeira April 11, 2018 17:12
Copy link

@jubeira jubeira left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

I only have one comment regarding this. I think this is good to have even if not all the tests are passing; we can fix them in future PRs.

}

@Test
public void testChannelBufferFixedSizeNoInitialization() {
Copy link

Choose a reason for hiding this comment

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

What's the difference between this test and a simple byte array? Should we add a byte array test too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. I will see to add tests for byte arrays, although according to this comment ChannelBuffer is the preferred way.

Copy link
Member Author

Choose a reason for hiding this comment

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

Found this in the RawMessage interface:

  /**
   * @deprecated replaced by {@link #setInt8(String, byte)}
   */
  void setByte(String name, byte value);

  /**
   * @deprecated replaced by {@link #setInt8Array(String, byte[])}
   */
  void setByteArray(String name, byte[] value);

  /**
   * @deprecated replaced by {@link #setUInt8(String, byte)}
   */
  void setChar(String name, short value);

  /**
   * @deprecated replaced by {@link #setUInt8Array(String, byte[])}
   */
  void setCharArray(String name, short[] value);

Copy link
Member Author

Choose a reason for hiding this comment

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

Added the tests for byte arrays and they are failing too.

image

@jubeira
Copy link

jubeira commented Apr 16, 2018

Thanks @ernestmc; you already have my approval :)

@ernestmc ernestmc merged commit b9a9858 into rosjava:kinetic Apr 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants