| 2894 | } |
| 2895 | |
| 2896 | func TestInterruptErrorIs(t *testing.T) { |
| 2897 | ie := InterruptError{} |
| 2898 | tests := []struct { |
| 2899 | name string |
| 2900 | target error |
| 2901 | want bool |
| 2902 | }{ |
| 2903 | { |
| 2904 | name: "same type", |
| 2905 | target: InterruptError{}, |
| 2906 | want: true, |
| 2907 | }, |
| 2908 | { |
| 2909 | name: "different error", |
| 2910 | target: fmt.Errorf("other error"), |
| 2911 | want: false, |
| 2912 | }, |
| 2913 | } |
| 2914 | for _, tc := range tests { |
| 2915 | t.Run(tc.name, func(t *testing.T) { |
| 2916 | if got := ie.Is(tc.target); got != tc.want { |
| 2917 | t.Errorf("Is(%v) = %t, wanted %t", tc.target, got, tc.want) |
| 2918 | } |
| 2919 | }) |
| 2920 | } |
| 2921 | } |
| 2922 | |
| 2923 | func TestFolderActivation(t *testing.T) { |
| 2924 | parentAct := EmptyActivation() |