Skip to content

Commit

Permalink
Move IrpTransmogrifier to the top level
Browse files Browse the repository at this point in the history
It is used by the cir crate as well as the irp crate.

Signed-off-by: Sean Young <[email protected]>
  • Loading branch information
seanyoung committed May 22, 2024
1 parent 8b06843 commit c02ba7a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Build IrpTransmogrifier
run: |
mvn -B -V package
working-directory: irp/tests/IrpTransmogrifier
working-directory: IrpTransmogrifier
- name: Build
run: cargo build --verbose
- name: Run tests
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "irp/tests/IrpTransmogrifier"]
path = irp/tests/IrpTransmogrifier
[submodule "IrpTransmogrifier"]
path = IrpTransmogrifier
url = https://github.com/bengtmartensson/IrpTransmogrifier
2 changes: 1 addition & 1 deletion cir/tests/decode_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ fn irp() {
"decode",
"-i",
"Blaupunkt",
"--irp-protocols=../irp/tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
"--irp-protocols=../IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
"--raw=+512 -2560 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -23040 +512 -2560 +512 -1024 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +1024 -1024 +512 -512 +512 -120832 +512 -2560 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -23040",
])
.assert();
Expand Down
4 changes: 3 additions & 1 deletion cir/tests/encode_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fn encode_test() {
"{40k,600}<1,-1|2,-1>(4,-1,F:8,^45m)+[F:0..255]",
"--repeats",
"1",
"--irp-protocols",
"../IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
])
.assert();

Expand Down Expand Up @@ -73,7 +75,7 @@ fn encode_irp_test() {
"--dry-run",
"--irp=Blaupunkt",
"--irp-protocols",
"../irp/tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
"../IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
"-aF=0,D=1",
])
.assert();
Expand Down
2 changes: 1 addition & 1 deletion irp/tests/bpf_decoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::{
#[test]
fn decode_all() {
let mut protocols = Protocol::parse(&PathBuf::from(
"tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
"../IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
))
.unwrap();

Expand Down
8 changes: 4 additions & 4 deletions irp/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ fn vars() {
#[test]
fn parse_all_of_them() {
let protocols = Protocol::parse(&PathBuf::from(
"tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
"../IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
))
.unwrap();

Expand Down Expand Up @@ -329,13 +329,13 @@ fn compare_with_rounding(l: &[u32], r: &[u32]) -> bool {
#[test]
fn compare_encode_to_transmogrifier() {
let mut protocols = Protocol::parse(&PathBuf::from(
"tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
"../IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
))
.unwrap();

let mut total_tests = 0;
let mut fails = 0;
let jvm = create_jvm("tests/IrpTransmogrifier");
let jvm = create_jvm("../IrpTransmogrifier");
let mut rng = rand::thread_rng();

protocols.push(Protocol {
Expand Down Expand Up @@ -427,7 +427,7 @@ fn compare_encode_to_transmogrifier() {
#[test]
fn decode_all() {
let mut protocols = Protocol::parse(&PathBuf::from(
"tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
"../IrpTransmogrifier/src/main/resources/IrpProtocols.xml",
))
.unwrap();

Expand Down

0 comments on commit c02ba7a

Please sign in to comment.