mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-26 02:47:59 +00:00
Better Compiler Interface & Shared Compiler Objects (#156)
* Add leader and follower node assignment to test * Update the compilers interface * Fix Cargo machete * Add reporting back to the compilers * Remove the static testing target from the report * Uncomment instrument macro * Switch to a for loop when reporting cases * Update compilers to use interior caching * Update tests stream func * Fix tests
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use anyhow::Context;
|
||||
use regex::Regex;
|
||||
use revive_dt_common::iterators::EitherIter;
|
||||
use revive_dt_common::types::{Mode, ModeOptimizerSetting, ModePipeline};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashSet;
|
||||
@@ -176,27 +177,6 @@ impl ParsedMode {
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator that could be either of two iterators.
|
||||
#[derive(Clone, Debug)]
|
||||
enum EitherIter<A, B> {
|
||||
A(A),
|
||||
B(B),
|
||||
}
|
||||
|
||||
impl<A, B> Iterator for EitherIter<A, B>
|
||||
where
|
||||
A: Iterator,
|
||||
B: Iterator<Item = A::Item>,
|
||||
{
|
||||
type Item = A::Item;
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
match self {
|
||||
EitherIter::A(iter) => iter.next(),
|
||||
EitherIter::B(iter) => iter.next(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user