63 lines
1.8 KiB
Bash
Executable File
63 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "=== Bit Commands Test ==="
|
|
|
|
echo "1. Testing SETBIT and GETBIT..."
|
|
dotnet run -- setbit flags 0 1 -i localhost
|
|
dotnet run -- setbit flags 1 1 -i localhost
|
|
dotnet run -- setbit flags 2 0 -i localhost
|
|
dotnet run -- setbit flags 3 1 -i localhost
|
|
dotnet run -- getbit flags 0 -i localhost
|
|
dotnet run -- getbit flags 1 -i localhost
|
|
dotnet run -- getbit flags 2 -i localhost
|
|
dotnet run -- getbit flags 3 -i localhost
|
|
|
|
echo ""
|
|
echo "2. Testing BITCOUNT..."
|
|
dotnet run -- bitcount flags -i localhost
|
|
|
|
echo ""
|
|
echo "3. Testing BITPOS..."
|
|
dotnet run -- bitpos flags 1 -i localhost
|
|
dotnet run -- bitpos flags 0 -i localhost
|
|
|
|
echo ""
|
|
echo "4. Testing BITFIELD..."
|
|
dotnet run -- bitfield numbers SET u8 0 255 GET u8 0 -i localhost
|
|
|
|
dotnet run -- bitfield numbers SET i16 8 32767 GET i16 8 -i localhost
|
|
|
|
dotnet run -- bitfield numbers INCRBY u8 0 1 GET u8 0 -i localhost
|
|
|
|
echo ""
|
|
echo "5. Testing BITOP..."
|
|
dotnet run -- setbit flags1 0 1 -i localhost
|
|
dotnet run -- setbit flags1 1 0 -i localhost
|
|
dotnet run -- setbit flags2 0 0 -i localhost
|
|
dotnet run -- setbit flags2 1 1 -i localhost
|
|
dotnet run -- bitop AND result flags1 flags2 -i localhost
|
|
dotnet run -- getbit result 0 -i localhost
|
|
dotnet run -- getbit result 1 -i localhost
|
|
|
|
echo ""
|
|
echo "6. Testing BITOP OR..."
|
|
dotnet run -- bitop OR result_or flags1 flags2 -i localhost
|
|
dotnet run -- getbit result_or 0 -i localhost
|
|
dotnet run -- getbit result_or 1 -i localhost
|
|
|
|
echo ""
|
|
echo "7. Testing BITOP XOR..."
|
|
dotnet run -- bitop XOR result_xor flags1 flags2 -i localhost
|
|
dotnet run -- getbit result_xor 0 -i localhost
|
|
dotnet run -- getbit result_xor 1 -i localhost
|
|
|
|
echo ""
|
|
echo "8. Testing BITOP NOT..."
|
|
dotnet run -- bitop NOT result_not flags1 -i localhost
|
|
dotnet run -- getbit result_not 0 -i localhost
|
|
dotnet run -- getbit result_not 1 -i localhost
|
|
|
|
echo ""
|
|
echo "Bit Commands Test Complete!"
|
|
echo ""
|