This is likely to be simply badly optimised code by the compiler, but to explain what it has done, while being thorough it added the bitwise "test" to look for any other value except for the 1 you were initially looking for.
The compiler has generated code to evaluate whether EAX is 0 or 1 and strictly no other value.
if(a==1){...}
else if(a<>0){...}
...
00401143: 83 F8 01 cmp eax,1 ...EAX is 1?
00401146: 0F 84 F4 00 00 00 je 00401240 ...EAX is 1...
0040114C: 85 C0 test eax,eax ...EAX is strictly 0? (eax & eax)
0040114E: 0F 85 A0 00 00 00 jne 004011F4 ...EAX is another value