Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for assertBasic (0.06 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. guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

      private EscaperAsserts() {}
    
      /**
       * Asserts that an escaper behaves correctly with respect to null inputs.
       *
       * @param escaper the non-null escaper to test
       */
      public static void assertBasic(Escaper escaper) throws IOException {
        // Escapers operate on characters: no characters, no escaping.
        Assert.assertEquals("", escaper.escape(""));
        // Assert that escapers throw null pointer exceptions.
        try {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 18 20:55:09 UTC 2022
    - 3.8K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

      private EscaperAsserts() {}
    
      /**
       * Asserts that an escaper behaves correctly with respect to null inputs.
       *
       * @param escaper the non-null escaper to test
       */
      public static void assertBasic(Escaper escaper) throws IOException {
        // Escapers operate on characters: no characters, no escaping.
        Assert.assertEquals("", escaper.escape(""));
        // Assert that escapers throw null pointer exceptions.
        try {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 18 20:55:09 UTC 2022
    - 3.8K bytes
    - Viewed (0)
  5. 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