Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

30
LINES

< > BotCompany Repo | #1031084 - Test deflaterOutputStream_syncFlush (OK)

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 974K of libraries. Click here for Pure Java version (6799L/36K).

!7

cmodule2 > DynTestModule {
  transient File file;
  transient PrintWriter writer;
  transient new StringBuilder buf;
  
  void printToFile(S s) {
    writer.print(s);
    writer.flush();
    buf.append(s);
    checkFile();
  }
  
  void checkFile {
    printFileInfo(file);
    assertEqualsVerbose(str(buf), loadDeflatedTextFile(file));
  }
  
  void test {
    file = programFile("test.log.deflated");
    deleteFile(file);
    writer = printWriter(deflaterOutputStream_syncFlush(file));
    printToFile("Hello\n");
    printToFile("world\n");
    printToFile(repS("abc", 500));
    writer.close();
    checkFile();
  }
}

Author comment

Began life as a copy of #1031081

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1031084
Snippet name: Test deflaterOutputStream_syncFlush (OK)
Eternal ID of this version: #1031084/5
Text MD5: 0ddafd86b9398909874fb6fe8952f14b
Transpilation MD5: fc4521c86c219e4289e1a946761e594d
Author: stefan
Category: javax / io
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-04-30 23:45:49
Source code size: 655 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 22 / 95
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1031084 & http://1031084.tinybrain.de