-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
11 changed files
with
130 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,52 @@ | ||
# Package Files # | ||
### How to update | ||
# This is copied from OpenHFT/.gitignore | ||
# update the original and run OpenHFT/update_gitignore.sh | ||
|
||
### Compiled class file | ||
*.class | ||
|
||
### Package Files | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
# IntelliJ | ||
### Log file | ||
*.log | ||
|
||
### IntelliJ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea | ||
.attach_pid* | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
### Virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
# Eclipse | ||
### Maven template | ||
target/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
release.properties | ||
|
||
### Eclipse template | ||
*.pydevproject | ||
.metadata | ||
.gradle | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.classpath | ||
.project | ||
.settings/ | ||
.loadpath | ||
|
||
# maven | ||
target | ||
|
||
.attach_pid* | ||
### Queue files | ||
*.cq4t | ||
*.cq4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/test/java/net/openhft/chronicle/wire/VanillaWireParserTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package net.openhft.chronicle.wire; | ||
|
||
import net.openhft.chronicle.bytes.Bytes; | ||
import net.openhft.chronicle.bytes.MethodId; | ||
import net.openhft.chronicle.bytes.MethodReader; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
|
||
public class VanillaWireParserTest { | ||
|
||
@Test | ||
public void shouldDetermineMethodNamesFromMethodIds() { | ||
final BinaryWire wire = new BinaryWire(Bytes.allocateElasticDirect()); | ||
final Speaker speaker = | ||
wire.methodWriterBuilder(Speaker.class).useMethodIds(true).build(); | ||
speaker.say("hello"); | ||
|
||
final MethodReader reader = new VanillaMethodReaderBuilder(wire).build(impl()); | ||
assertTrue(reader.readOne()); | ||
} | ||
|
||
interface Speaker { | ||
@MethodId(7) | ||
void say(final String message); | ||
} | ||
|
||
interface Listener { | ||
void hear(final String message); | ||
} | ||
|
||
private static Listener impl() { | ||
return m -> {}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters