use brood::{query::{Views, filter, Result}, registry, system::{System, Schedule}};
// This import is technically unused, since the macro fails to compile before it would be consumed.
// I'm leaving it here, though, for completeness; user code would use this module, and these tests
// should do their best to simulate user code.
#[allow(unused_imports)]
use brood::system::schedule::task;

// Define systems.
struct A;

impl System for A {
    type Views<'a> = Views!();
    type Filter = filter::None;
    type ResourceViews<'a> = Views!();
    type EntryViews<'a> = Views!();

    fn run<'a, R, S, I, E>(
        &mut self,
        _query_results: Result<R, S, I, Self::ResourceViews<'a>, Self::EntryViews<'a>, E>,
    ) where
        R: registry::Registry, I: Iterator<Item = Self::Views<'a>> {}
}

struct B;

impl System for B {
    type Views<'a> = Views!();
    type Filter = filter::None;
    type ResourceViews<'a> = Views!();
    type EntryViews<'a> = Views!();

    fn run<'a, R, S, I, E>(
        &mut self,
        _query_results: Result<R, S, I, Self::ResourceViews<'a>, Self::EntryViews<'a>, E>,
    ) where
        R: registry::Registry, I: Iterator<Item = Self::Views<'a>> {}
}

type Schedule = Schedule!(task::System<A>, + task::System<B>,);

fn main() {}
