Skip to content

Commit

Permalink
Merge pull request #382 from fprime-community/dp-code-gen
Browse files Browse the repository at this point in the history
Fix code gen for DP unit tests
  • Loading branch information
bocchino authored Jan 17, 2024
2 parents 4174ca5 + 85bb309 commit d72dc6b
Show file tree
Hide file tree
Showing 16 changed files with 210 additions and 1,694 deletions.
1,849 changes: 186 additions & 1,663 deletions compiler/lib/src/main/resources/META-INF/native-image/reflect-config.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,18 @@ case class ComponentTesterBaseWriter(
line(s"delete this->$historyName;")
})
lazy val destroyDpHistories = {
lazy val destroyProductGetHistory = lines(
"delete this->productGetHistory;"
)
lazy val destroyProductRequestHistory = lines(
"""|// Destroy product request history
|delete this->productRequestHistory;
|"""
"delete this->productRequestHistory;"
)
val destroyProductSendHistory = lines(
"""|// Destroy product send history
|delete this->productSendHistory;
|"""
"delete this->productSendHistory;"
)
line("// Destroy data product histories") ::
List.concat(
guardedList (hasProductGetPort) (destroyProductGetHistory),
guardedList (hasProductRequestPort) (destroyProductRequestHistory),
destroyProductSendHistory
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,8 @@ ActiveAsyncProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,8 @@ ActiveGetProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product send history
// Destroy data product histories
delete this->productGetHistory;
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,8 @@ ActiveGuardedProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,8 @@ ActiveSyncProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1167,9 +1167,8 @@ namespace M {
delete this->tlmHistory_ChannelU32OnChange;
delete this->tlmHistory_ChannelEnumOnChange;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,8 @@ PassiveGetProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product send history
// Destroy data product histories
delete this->productGetHistory;
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,8 @@ PassiveGuardedProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,8 @@ PassiveSyncProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,8 @@ PassiveTestTesterBase ::
delete this->tlmHistory_ChannelU32OnChange;
delete this->tlmHistory_ChannelEnumOnChange;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,8 @@ QueuedAsyncProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,8 @@ QueuedGetProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product send history
// Destroy data product histories
delete this->productGetHistory;
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,8 @@ QueuedGuardedProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,8 @@ QueuedSyncProductsTesterBase ::
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1165,9 +1165,8 @@ QueuedTestTesterBase ::
delete this->tlmHistory_ChannelU32OnChange;
delete this->tlmHistory_ChannelEnumOnChange;

// Destroy product request history
// Destroy data product histories
delete this->productRequestHistory;
// Destroy product send history
delete this->productSendHistory;
}

Expand Down

0 comments on commit d72dc6b

Please sign in to comment.