Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for assertBasic (0.11 sec)

  1. guava-tests/test/com/google/common/escape/ArrayBasedCharEscaperTest.java

              @Override
              protected char[] escapeUnsafe(char c) {
                return ("{" + c + "}").toCharArray();
              }
            };
        EscaperAsserts.assertBasic(wrappingEscaper);
        // '[' and '@' lie either side of [A-Z].
        assertEquals("{[}FOO{@}BAR{]}", wrappingEscaper.escape("[FOO@BAR]"));
      }
    
      public void testSafeRange_maxLessThanMin() throws IOException {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 07 23:02:38 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/escape/EscapersTest.java

    /** @author David Beaumont */
    @GwtCompatible
    public class EscapersTest extends TestCase {
      public void testNullEscaper() throws IOException {
        Escaper escaper = Escapers.nullEscaper();
        EscaperAsserts.assertBasic(escaper);
        String s = "\0\n\t\\az09~\uD800\uDC00\uFFFF";
        assertEquals("null escaper should have no effect", s, escaper.escape(s));
      }
    
      public void testBuilderInitialStateNoReplacement() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. tests/transaction_test.go

    		tx.First(&result, user.ID)
    		return nil
    	})
    
    	if err == nil {
    		t.Fatalf("Transaction should get error when using cancelled context")
    	}
    }
    
    func TestTransactionWithBlock(t *testing.T) {
    	assertPanic := func(f func()) {
    		defer func() {
    			if r := recover(); r == nil {
    				t.Fatalf("The code did not panic")
    			}
    		}()
    		f()
    	}
    
    	// rollback
    	err := DB.Transaction(func(tx *gorm.DB) error {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 12.9K bytes
    - Viewed (0)
Back to top