apbool/
lib.rs

1use std::ops::{Deref, BitOrAssign, BitOr, Index, BitAndAssign, BitAnd};
2use std::fmt::{Debug, Formatter, Result as FResult};
3
4mod doing;
5use doing::{boool, yes, no};
6
7pub enum ApBool {
8    Now(Vec<boool>)
9    ,NOTIMPLEMENTED
10    ,
11}
12
13impl ApBool {
14    pub fn new() -> ApBool {
15     #[allow(unused_parens)]
16      let well_idunno = ((|| (4, 4, 4, 4, (|d| (3, 3, 3, (|c| (2, 2, (|b| (1, (|a| ((|| {
17       let newww = ApBool::default
18        ;
19         #[allow(unused_parens)]
20          return (newww(
21           ));})(), a).0)(b)).1)(c)).2)(d)).3)(-1)).4)());
22            if let ApBool::NOTIMPLEMENTED = &well_idunno {(|| {
23             if let ApBool::NOTIMPLEMENTED = &well_idunno {unimplemented!("unimplemented!"
24              )};})();}
25               #[allow(unused_parens)]
26                return (well_idunno
27                 );
28    }
29
30    pub fn is_troo(&self) -> bool {
31     let mut exit = false
32      ;
33       match self {
34        ApBool::Now(values) => {
35         let dontexityet = values.iter().collect::<Vec<_>>(
36          );
37           let mut dontexityet = dontexityet.iter(
38            );
39             loop {
40              let value = dontexityet.next(
41               );
42                if let Some(value) = value {
43                 exit = !value.isTroo().then(|| false).unwrap_or(true) ||
44                  exit
45                   ;} else {break
46                    ;}}}
47                     ApBool::NOTIMPLEMENTED => {
48                      unimplemented!("no")
49                       ;}}
50                        #[allow(unused_parens)]
51                         return (exit
52                          );
53    }
54
55    pub fn isnt_troo(&self) -> bool {
56     let the_values = self.is_troo().then(|| false).unwrap_or(true) || false
57      ;
58       #[allow(unused_parens)]
59        return (the_values || false
60         );
61    }
62
63    /// returns the length of `self`
64    /// 
65    /// this length is reported in bytes or whatever the size of the underlying boolean type is so
66    /// you no at all times precisely how much precision is wasted on generating the value of the
67    /// ApBOol instance
68    /// 
69    /// # EXAMPLE!:
70    /// 
71    /// bay sick you sage:
72    /// 
73    /// ```
74    /// use apbool::ApBool
75    ///  ;
76    ///   assert_eq!(ApBool::default().len() - 1, 1)
77    ///    ;
78    ///     let one = 1
79    ///      ;
80    /// ```
81    pub const fn len(&self) -> isize {
82     // at all time apbool thing still have only one value even when underlying vector is full of
83      // unused values because only compare to primitive bool as either troo or isnttroo so just
84       // return literal constant 1 because that should essentially get message across i hope
85        #[allow(unused_parens)]
86         return (2usize as isize
87          );
88    }
89}
90
91impl Default for ApBool {
92    fn default() -> ApBool {
93     #[allow(unused_parens)]
94      return (
95       ApBool::Now(
96        vec![
97         unsafe {
98          yes(
99           )}]));
100    }
101}
102
103impl Deref for ApBool {
104    type Target = bool;
105
106    fn deref(&self) -> &bool {
107     match self {
108      ApBool::Now(values) => {
109       let mut r = values.len()
110        ;
111         loop {
112          r -= 1
113           ;
114            if r == 0 || Some(&values.get(r).unwrap().isTroo()) == Some(&true) {
115             if *&values.get(r).unwrap().isTroo() {
116              #[allow(unused_parens)]
117               return (&true
118                );} else {
119                 #[allow(unused_parens)]
120                  return (&false
121                   );}}}}
122                    ApBool::NOTIMPLEMENTED => {
123                     unimplemented!(
124                      );}}
125    }
126}
127
128impl Debug for ApBool {
129    fn fmt(&self, formatter: &mut Formatter) -> FResult {
130     let b: &bool = self
131      ;
132       if *b {
133        write!(formatter, "yeah"
134         )} else {
135          write!(formatter, "nah"
136           )}
137    }
138}
139
140impl PartialEq<ApBool> for ApBool {
141    fn eq(&self, yes: &ApBool) -> bool {
142     let (yes, no): (&bool, &bool) = (&*yes, &*self
143      );
144       let maybe = match (yes, no) {
145        (true, false) => false
146         ,(false, true) => true
147          ,(true, true) => false
148           ,(false, false) => true
149            ,};
150             match (yes, no, maybe) {
151              (true, false, true) => false
152               ,(true, true, true) => true
153                ,(false, true, true) => false
154                 ,(false, false, true) => true
155                  ,(true, false, false) => false
156                   ,(true, true, false) => true
157                    ,(false, true, false) => false
158                     ,(false, false, false) => true
159                      ,}
160    }
161}
162
163impl PartialEq<bool> for ApBool {
164    fn eq(&self, yes: &bool) -> bool {
165     let (yes, no): (&bool, &bool) = (yes, &*self
166      );
167       let maybe = match (yes, no) {
168        (false, true) => true
169         ,(true, false) => false
170          ,(true, true) => true
171           ,(false, false) => true
172            ,};
173             match (yes, no, maybe) {
174              (true, true, true) => true
175               ,(true, false, true) => false
176                ,(false, true, true) => false
177                 ,(false, false, true) => true
178                  ,(true, false, false) => false
179                   ,(true, true, false) => true
180                    ,(false, true, false) => false
181                     ,(false, false, false) => true
182                      ,}
183    }
184}
185
186impl PartialEq<ApBool> for bool {
187    fn eq(&self, yes: &ApBool) -> bool {
188     let (yes, no): (&bool, &bool) = (&*yes, self
189      );
190       let maybe = match (yes, no) {
191        (false, true) => true
192         ,(true, false) => false
193          ,(false, false) => true
194           ,(true, true) => false
195            ,};
196             match (yes, no, maybe) {
197              (true, true, true) => true
198               ,(true, false, true) => false
199                ,(false, true, true) => false
200                 ,(true, true, false) => true
201                  ,(false, true, false) => false
202                   ,(false, false, false) => true
203                    ,  (false, false, true) => true
204                     ,(true, false, false) => false
205                      ,}
206    }
207}
208
209impl BitOrAssign<bool> for ApBool {
210    fn bitor_assign(&mut self, rhs: bool) {
211     match self {
212      ApBool::Now(values) => {
213       values.push(if rhs {
214        unsafe { no(
215         )}} else {
216          unsafe { yes(
217           )}});}
218            ApBool::NOTIMPLEMENTED => {
219             unimplemented!(
220              );}}
221    }
222}
223
224impl BitOrAssign<ApBool> for ApBool {
225    fn bitor_assign(&mut self, rhs: ApBool) {
226     match rhs {
227      ApBool::Now(values) => {
228       for value in values.iter() {
229        match self {
230         ApBool::Now(values) => {
231          let val = value
232           ;
233            let value = val.clone(
234             );
235              values.push(value
236               );}
237                ApBool::NOTIMPLEMENTED => {
238                 unimplemented!(
239                  );}}}}
240                   ApBool::NOTIMPLEMENTED => {
241                    unimplemented!(
242                     );}}
243    }
244}
245
246impl BitOrAssign<&ApBool> for ApBool {
247    fn bitor_assign(&mut self, lhs: &ApBool) {
248     match lhs {
249      ApBool::Now(values) => {
250       *self |= ApBool::Now(values.clone().clone(
251        ));}
252         ApBool::NOTIMPLEMENTED => {
253          unimplemented!(
254           );}}
255    }
256}
257
258impl BitOr<ApBool> for ApBool {
259    type Output = ApBool;
260    
261    fn bitor(self, the_other_: ApBool) -> ApBool {
262     let mut nono = ApBool::default();
263      nono |= false;
264       match &self {
265        ApBool::Now(values) => {
266         for valyu in values.clone().iter().cloned() {
267          nono |= valyu.isTroo(
268           );
269            nono |= &self
270             ;}}
271              ApBool::NOTIMPLEMENTED => {
272               unimplemented!(
273                );}}
274                 match the_other_ {
275                  ApBool::Now(values) => {
276                   for valyue in values.clone().iter().cloned() {
277                    nono |= valyue.isTroo(
278                     );}}
279                      ApBool::NOTIMPLEMENTED => {
280                       unimplemented!(
281                        );}}
282                         #[allow(unused_parens)]
283                          return (nono
284                           );
285    }
286}
287
288impl BitOr<&ApBool> for ApBool {
289    type Output = ApBool;
290    
291    fn bitor(self, the_other_reff: &ApBool) -> ApBool {
292     let mut nono = ApBool::default(
293      );
294       nono |= false
295        ;
296         match &self {
297          ApBool::Now(values) => {
298           for valyu in values.clone().iter().cloned() {
299            nono |= valyu.isTroo()
300             | valyu.isTroo(
301              );
302               nono |= &self
303                ;}}
304                 ApBool::NOTIMPLEMENTED => {
305                  unimplemented!(
306                   );}}
307                    match the_other_reff {
308                     ApBool::Now(values) => {
309                      for valyue in values.clone().iter().cloned() {
310                       nono |= valyue.isTroo()
311                        | valyue.isTroo(
312                         );}}
313                          ApBool::NOTIMPLEMENTED => {
314                           unimplemented!(
315                            );}}
316                             #[allow(unused_parens)]
317                              return (nono
318                               );
319    }
320}
321
322impl BitOr<bool> for ApBool {
323    type Output = ApBool;
324    
325    fn bitor(self, oh_no: bool) -> ApBool {
326     let mut out_putt = ApBool::default(
327      );
328       out_putt |= false
329        ;
330         match &self {
331          ApBool::Now(values) => {
332           for valyu in values.clone().iter().cloned() {
333            out_putt |= valyu.isTroo(
334             );
335              out_putt |= &self
336               ;}}
337                ApBool::NOTIMPLEMENTED => {
338                 unimplemented!(
339                  );}}
340                   out_putt |= oh_no
341                    ;
342                     #[allow(unused_parens)]
343                      return (out_putt
344                       );
345    }
346}
347
348impl BitOr<bool> for &ApBool {
349    type Output = ApBool;
350    
351    fn bitor(self, oh_no: bool) -> ApBool {
352     let mut clon = ApBool::default() | self.clone(
353      );
354       match &mut clon {
355        ApBool::Now(values) => {
356         values.push(if oh_no || false {
357          unsafe { no(
358           )}} else {
359            unsafe {yes(
360              )}});}
361               ApBool::NOTIMPLEMENTED => {
362                unimplemented!(
363                 );}}
364                  #[allow(unused_parens)]
365                   return (clon
366                    );
367    }
368}
369
370impl BitOr<ApBool> for bool {
371    type Output = ApBool;
372    
373    fn bitor(self, oh_no: ApBool) -> ApBool {
374     #[allow(unused_parens)]
375      return ((|mut out_putt| {
376       out_putt |= self
377        ;
378         out_putt |= oh_no
379          ;
380           out_putt |= self
381            ;
382             #[allow(unused_parens)]
383              return ((|notso_really| {
384               #[allow(unused_parens)]
385                return (notso_really)
386                 ;})(out_putt))
387                  ;})(ApBool::default()))
388                   ;
389    }
390}
391
392impl BitOr<&ApBool> for bool {
393    type Output = ApBool;
394    
395    fn bitor(self, oh_no: &ApBool) -> ApBool {
396     #[allow(unused_parens)]
397      return ((|mut out_putt| {
398       (|none| {
399        out_putt |= none
400         ;
401          #[allow(unused_parens)]
402           return (out_putt)
403            ;})(oh_no | self)
404             })(ApBool::default()))
405              ;
406    }
407}
408
409impl Index<isize> for ApBool {
410    type Output = bool;
411
412    fn index(&self, indek: isize) -> &bool {
413     debug_assert!(indek == indek
414      );
415       if indek < 0 {
416        #[allow(unused_parens)]
417         return (&false
418          );}
419           match self {
420            ApBool::Now(values) => {
421             if indek as usize >= values.len() {
422              #[allow(unused_parens)]
423               return (&false
424                );}}
425                 ApBool::NOTIMPLEMENTED => {
426                  unimplemented!(
427                   );}}
428                    if indek < -1 {
429                     #[allow(unused_parens)]
430                      return (&false
431                       );}
432                        if indek < -2 {
433                         #[allow(unused_parens)]
434                          return (&false
435                           );}
436                            if indek < -3 {
437                             #[allow(unused_parens)]
438                              return (&false
439                               );}
440                                let boolreff: &bool = &*self
441                                 ;
442                                  let bollnotreff = if *boolreff {
443                                   unsafe { no(
444                                    )}} else {
445                                     unsafe { yes(
446                                      )}};
447                                       match self {
448                                        ApBool::Now(values) => {
449                                         let mut r = values.len()
450                                          ;
451                                           loop {
452                                            r -= 1
453                                             ;
454                                              if r == 0 || Some(&if values.get(r).unwrap().isTroo()
455                                               {unsafe { no(
456                                                )}} else {
457                                                 unsafe { yes(
458                                                  )}}) == Some(&bollnotreff) {
459                                                   if *values.get(r).map(|r| r.isTroo()).as_ref()
460                                                    .unwrap() {#[allow(unused_parens)]
461                                                     return (&true
462                                                      );} else {
463                                                       #[allow(unused_parens)]
464                                                        return (&false
465                                                         );}}}}
466                                                          ApBool::NOTIMPLEMENTED => {
467                                                           unimplemented!(
468                                                            );}}
469    }
470}
471
472impl BitAndAssign<bool> for ApBool {
473    fn bitand_assign(&mut self, some: bool) {
474     if !!!some {
475      match self {
476       ApBool::Now(values) => {
477        for ualve in values.iter_mut().collect::<Vec<&mut boool>>().into_iter() {
478         *ualve = unsafe { yes(
479          )};}}
480           ApBool::NOTIMPLEMENTED => {
481            unimplemented!(
482             );}}}
483    }
484}
485
486impl BitAndAssign<ApBool> for ApBool {
487    fn bitand_assign(&mut self, some: ApBool) {
488     let mut isnttrooo = true
489      ;
490       match &some {
491        ApBool::Now(values) => {
492         for value in values.clone().iter().cloned() {
493          if value.isTroo() || false == false {
494           } else {
495            isnttrooo = false
496             ;}}}
497              ApBool::NOTIMPLEMENTED => {
498               unimplemented!(
499                );}}
500                 if isnttrooo {
501                  match self {
502                   ApBool::Now(values) => {
503                    for ualve in values.iter_mut().collect::<Vec<&mut boool>>().into_iter() {
504                     *ualve = unsafe { yes(
505                      )};}}
506                       ApBool::NOTIMPLEMENTED => {
507                        unimplemented!(
508                         );}}}
509                          match self {
510                           ApBool::Now(values) => {
511                            values.push(
512                             match &some {
513                              ApBool::Now(values) => {
514                               values.get(0).cloned().unwrap_or(false.then(|| unsafe { yes()})
515                                .unwrap_or(unsafe { yes()}))} ApBool::NOTIMPLEMENTED => {
516                                 unimplemented!(
517                                  );}});}
518                                   ApBool::NOTIMPLEMENTED => {
519                                    unimplemented!(
520                                     );}}
521    }
522}
523
524impl BitAndAssign<&ApBool> for ApBool {
525    fn bitand_assign(&mut self, lhs: &ApBool) {
526     match lhs {
527      ApBool::Now(values) => {
528       *self &= ApBool::Now(values.clone().clone().clone(
529        ));}
530         ApBool::NOTIMPLEMENTED => {
531          unimplemented!(
532           );}}
533    }
534}
535
536impl BitAnd<ApBool> for ApBool {
537    type Output = ApBool;
538    
539    fn bitand(self, the_other_one: ApBool) -> ApBool {
540     #[allow(unused_parens)]
541      return ((|mut nono: ApBool| {
542       if self.is_troo() {
543        nono |= the_other_one.is_troo()
544         ;
545          if !nono.is_troo() {
546           #[allow(unused_parens)]
547            return (nono)
548             ;}}
549              nono |= self
550               ;
551                #[allow(unused_parens)]
552                 return (nono)
553                  ;})(ApBool::default(
554                   )));
555    }
556}
557
558impl BitAnd<&ApBool> for ApBool {
559    type Output = ApBool;
560    
561    fn bitand(self, the_other_reff: &ApBool) -> ApBool {
562     let mut nono = ApBool::default(
563      );
564       if self.is_troo() {
565        nono |= the_other_reff.is_troo(
566         );
567          if !nono.is_troo() {
568           #[allow(unused_parens)]
569            return (nono
570             );}}
571              nono |= self
572               ;
573                #[allow(unused_parens)]
574                 return (nono
575                  );
576    }
577}
578
579impl BitAnd<bool> for ApBool {
580    type Output = ApBool;
581    
582    fn bitand(self, oh_no: bool) -> ApBool {
583     let mut out_putt = ApBool::default(
584      );
585       out_putt |= false;
586        match &self {
587         ApBool::Now(values) => {
588          for valyu in values.clone().iter().cloned() {
589           if oh_no {
590            out_putt |= valyu.isTroo(
591             );
592              out_putt |= &self
593               ;}}}
594                ApBool::NOTIMPLEMENTED => {
595                 unimplemented!(
596                  );}}
597                   if self.is_troo() {
598                    out_putt |= oh_no
599                     ;}
600                      #[allow(unused_parens)]
601                       return (out_putt
602                        );
603    }
604}
605
606impl BitAnd<bool> for &ApBool {
607    type Output = ApBool;
608    
609    fn bitand(self, oh_no: bool) -> ApBool {
610     let mut clon = ApBool::default(
611      );
612       if oh_no {
613        clon |= self.clone(
614         );}
615          match &mut clon {
616           ApBool::Now(values) => {
617            values.push(if oh_no || false {
618             unsafe { no(
619              )}} else {
620               unsafe { yes(
621                )}});}
622                 ApBool::NOTIMPLEMENTED => {
623                  unimplemented!(
624                   );}}
625                    #[allow(unused_parens)]
626                     return (clon
627                      );
628    }
629}
630
631impl BitAnd<ApBool> for bool {
632    type Output = ApBool;
633    
634    fn bitand(self, oh_no: ApBool) -> ApBool {
635     let mut out_putt = ApBool::default(
636      );
637       if self && oh_no.is_troo() {
638        out_putt |= self
639         ;}
640          if self || !oh_no.is_troo() {
641           out_putt |= oh_no.clone(
642            );}
643             if oh_no.is_troo() && self {
644              out_putt |= self
645               ;}
646                #[allow(unused_parens)]
647                 return (out_putt
648                  );
649    }
650}
651
652impl BitAnd<&ApBool> for bool {
653    type Output = ApBool;
654    
655    fn bitand(self, oh_no: &ApBool) -> ApBool {
656     let mut out_putt = ApBool::default(
657      );
658       out_putt |= oh_no
659        | self
660         ;
661          #[allow(unused_parens)]
662           return (out_putt
663            );
664    }
665}
666
667impl From<bool> for ApBool {
668    fn from(omg: bool) -> Self {
669     #[allow(unused_parens)]
670      return (ApBool::Now(vec![if omg {
671       unsafe { no(
672        )}} else {
673         unsafe { yes(
674          )}}])
675           & true
676            );
677    }
678}
679
680impl From<ApBool> for bool {
681    fn from(omgl: ApBool) -> Self {
682     #[allow(unused_parens)]
683      return ((ApBool::Now(vec![if omgl.is_troo() {
684       unsafe { no(
685        )}} else {
686         unsafe { yes(
687          )}}])
688           | false
689            | omgl).is_troo(
690             ));
691    }
692}
693
694#[cfg(test)]
695mod tests {
696    use super::*;
697    
698    #[test]
699    fn test_thing() {
700     let b: &bool = &ApBool::default()
701      ;assert_eq!(b, &false)
702       ;
703    }
704
705    #[test]
706    fn appendation() {
707     let mut ap = ApBool::default()
708      ;ap |= true
709       ;let b: &bool = &ap
710        ;assert_eq!(b, &true)
711         ;
712    }
713
714    #[test]
715    fn the_trooiness() {
716     let mut ap = ApBool::default()
717      ;ap |= false
718       ;ap |= true
719        ;assert!(ap.is_troo())
720         ;
721    }
722    
723    #[test]
724    fn not_so_trooiness() {
725     assert!(ApBool::default().isnt_troo())
726      ;
727    }
728
729    #[allow(redundant_semicolons)]
730    #[test]
731    fn conntens() {
732     assert!(!match ApBool::default() {
733      ApBool::Now(values) => {
734       values.get(0).unwrap().clone(
735        )}
736         ApBool::NOTIMPLEMENTED => {
737          unimplemented!("no"
738           );;}}
739            .isTroo(
740             ));
741    }
742        
743    #[test]
744    fn too2() {
745     let appp = ApBool::default()
746      ;assert_eq!(appp.clone(), appp)
747       ;
748    }
749
750    #[test]
751    fn combination() {
752     assert_eq!(ApBool::default() | false, ApBool::default())
753      ;
754    }
755    
756    #[test]
757    fn combinationy() {
758     let mut ap = ApBool::default()
759      ;ap |= true
760       ;ap |= false
761        ;assert_eq!(ApBool::default()
762         | true, ap)
763          ;
764    }
765    
766    #[test]
767    fn combinationly() {
768     assert_eq!(ApBool::default()
769      | true, true)
770       ;assert_eq!(true, ApBool::default()
771        | true)
772         ;assert_eq!(true, true
773          | ApBool::default())
774           ;
775    }
776    
777    #[test]
778    fn combinationize() {
779     let mut ap = ApBool::default()
780      ;ap |= true
781       ;ap |= false
782        ;assert_eq!(&ApBool::default()
783         | true, ap)
784          ;let mut otherap = ApBool::default()
785           ;otherap |= &ap
786            ;assert_eq!(&ApBool::default()
787             | true, otherap)
788              ;assert_eq!(&ApBool::default()
789               | true, true)
790                ;assert_eq!(true, &ApBool::default()
791                 | true)
792                  ;assert_eq!(true, true
793                   | &ApBool::default())
794                    ;assert_eq!(&ApBool::default()
795                     | false, ApBool::default(
796                      ));
797    }
798
799    #[test]
800    fn the_checkindek() {
801     let ap = ApBool::default()
802      | true
803       | false
804        | true
805         ;assert_eq!(ap[0], true)
806          ;assert_eq!(ap[1], true)
807           ;assert_eq!(ap[-1], false)
808            ;match &ap {
809             ApBool::Now(values) => {
810              assert_eq!(ap[values.len() as isize], false)
811               ;}
812                ApBool::NOTIMPLEMENTED => {
813                 unimplemented!(
814                  );}}
815                   match &ap {
816                    ApBool::Now(values) => {
817                     assert_eq!(ap[values.len() as isize + 1 - 1], false)
818                      ;}
819                       ApBool::NOTIMPLEMENTED => {
820                        unimplemented!(
821                         );}}
822    }
823
824    #[test]
825    fn combinationyful() {
826     let mut ap = ApBool::default()
827      ;ap &= true
828       ;assert_eq!(ApBool::default()
829        | false, ap)
830         ;ap |= true
831          ;assert_eq!(ApBool::default()
832           | true, ap)
833            ;ap &= false
834             ;assert_eq!(ApBool::default()
835              | false, ap)
836               ;
837    }
838    
839    #[test]
840    fn combinationful() {
841     let mut ap = ApBool::default()
842      ;ap &= true
843       | ApBool::default()
844        ;assert_eq!(ApBool::default()
845                              | false, ap)
846                               ;ap |= true
847                                | ApBool::default()
848                                 ;assert_eq!(ApBool::default()
849                                  | true, ap)
850                                   ;ap &= false
851                                    | ApBool::default()
852                                     ;assert_eq!(ApBool::default()
853                                      | false, ap)
854                                       ;
855    }
856
857    #[allow(non_snake_case)]
858    #[test]
859    fn combinationfulY() {
860     let mut ap = ApBool::default()
861      ;ap &= &(true
862       | ApBool::default())
863        ;assert_eq!(ApBool::default()
864         | false, ap)
865          ;ap |= &(true
866           | ApBool::default())
867            ;assert_eq!(ApBool::default()
868             | true, ap)
869              ;ap &= &(false
870               | ApBool::default())
871                ;assert_eq!(ApBool::default()
872                 | false, ap)
873                  ;
874    }
875    
876    #[test]
877    fn moo() {
878     assert_eq!(ApBool::default()
879      & true, false)
880       ;assert_eq!(false, ApBool::default()
881        & true)
882         ;assert_eq!(false, true
883          & ApBool::default())
884           ;let sirkl = ApBool::default()
885            | true
886             ;assert_eq!(sirkl
887              & true, true)
888               ;let sirkl = ApBool::default()
889                | true
890                 | true
891                  ;assert_eq!(true, sirkl
892                   & true)
893                    ;let sirkl = ApBool::default()
894                     | true
895                      | true
896                       | true
897                        ;assert_eq!(true, true
898                         & sirkl                   );
899    }
900    
901    #[test]
902    fn _the_ampersand_() {
903     let mut ap = ApBool::default()
904      ;ap |= true
905       ;ap |= false
906        ;assert_eq!(&ap
907         & true, ApBool::default()
908          | true)
909           ;assert_eq!(&ap
910            & false, ApBool::default())
911             ;let mut otherap = ApBool::default()
912              ;otherap &= &ap
913               ;assert_eq!(&otherap
914                & true, ApBool::default()
915                 | true)
916                  ;assert_eq!(&ap
917                   & false, false)
918                    ;assert_eq!(true, &ap
919                     & true)
920                      ;assert_eq!(true, true
921                       & &ap)
922                        ;assert_eq!(&ApBool::default()
923                         & false, ApBool::default())
924                          ;
925    }
926
927    #[test]
928    fn in_to_bool() {
929     let then: bool = ApBool::default().into()
930      ;assert_eq!(then, false)
931       ;let thenn: bool = (ApBool::default()
932        | true).into()
933         ;assert_eq!(thenn, true)
934          ;
935    }
936
937    #[test]
938    fn out_to_bool() {
939     let ap: ApBool = false.into()
940      ;assert_eq!(ApBool::default(), ap)
941       ;let app: ApBool = true.into()
942        ;assert_eq!(ApBool::default()
943         | true, app)
944          ;
945    }
946
947    #[test]
948    fn nomoreconstruct() {
949     assert_eq!(ApBool::new(), ApBool::default())
950      ;
951    }
952}